Basic HTML Version

|  | Table of Contents |  | View Full Version

Page 133 - 2505_CoreGPT(Podar)_Flipbook_C5
P. 133

    2.  less than

                                 3.  equal to

                     Logical Operators

                     Using logical operators,  you can combine two or more relational operators  to
                     produce a single true/false result. These blocks allow you to further refine your

                     comparison of values.

                              Operator                                          Meaning

                                                    The result is true only if the two expressions are true.
                      1.  AND

                      2.  OR                        The result is true only if either of the expressions is true.

                                                    The result is true only if the expression is false.
                      3.  NOT

                           VARIABLES

                     Variables are used to hold values. These are the data values for which the value
                     can be changed when the code is being processed. There are two ways in which
                     the  values  can  be  assigned to  the  variables—by  the
                     programmer and by the user.

                     Each programming language has a method or syntax
                     for defining variables. In Scratch, the variables can be
                     created using Variables blocks.

                     To create a variable, follow these steps:
                     Step 1  Click on the Variables category of blocks.

                                                                                                     Data blocks

                                                                                     Basic Programming in Scratch       131

| 128 129 130 131 132 133 134 135 136 137 138 |