Page 75 - TechPluse_C4_Flipbook
P. 75

Using the addition operator

                 Similarly, you can use the other blocks to perform subtraction             , multiplication
                 and division        .

                 Relational Operators

                 Scratch has three operators  that allow you to compare the relationship between  two
                 values or variables. It will compare two numbers and decide whether  it is  true  or false.
                 In the example below, if the comparison is true, the program will go down to the next line of the

                 code and do what is there. If the comparison is false then the code will not execute.
                 The three relational operators are:

                                            Operator                               Example








                              1.  greater than












                              2.  less than














                              3.  equal to






                                                                                               Game on Scratch       73
   70   71   72   73   74   75   76   77   78   79   80