Basic HTML Version

|  | Table of Contents |  | View Full Version

Page 100 - 2629_Devagiri_C-4
P. 100

    LOGICAL OPERATORS

                      These operators are used to combine two or more conditions. The operator checks
                      if the conditions are true or false and gives the outcome.

                                                         This block checks if both conditions are true. It returns
                                           and
                                                        true if both are true and false if one or both are not.

                                                         This block checks if either of the two conditions is true.
                                            or
                                                        If at least one is true, it returns true, else it returns false.

                                                         This block  is used  to  reverse the result of a given
                                            not
                                                        condition.

                      For example, let’s create the given script:

                                     when   clicked
                                     if    100 >  50  and  100 >  60  then

                                        say  True, 100 is greater than 50 and 60
                                     else

                                        say  False, 50 and 60 is not greater than 100

                                                                                                      21 st
                           INTERDISCIPLINARY LEARNING                                               Century   #Critical Thinking
                                                                                                     Skills
                        Create a script to solve the given question: The robot has 228 gifts to pack and it can place 12
                        gifts in each box. The robot needs to figure out how many full boxes are needed.

                        Hint: Use the division operator.

                              PEN BLOCKS

                      Pen blocks let your sprite draw on the stage. It is used to create shapes, lines and

                      drawings in your project. These blocks are dark green in colour. The Pen blocks need
                      to be added to the block palette before they can be used.

                      98      Premium Edition-IV

| 95 96 97 98 99 100 101 102 103 104 105 |