Page 86 - 2403_Trackpad_V5.1_C6_Fb
P. 86

PURE
                        In Scratch, each number is equal to 1 step  of the sprite on the stage. In the
                        turn block, change the degree from 15 to 90.                                     FACT




                           VARIABLES IN SCRATCH

                  Variables are used to hold information such as words or numbers. Variables are named locations

                  where you can store information. We can create variables for one or for all the sprites.

                  GLOBAL VARIABLES

                  If a variable is created, to be used and modified by all the sprites, then it is known as a global
                  variable. A Global variable can be created on any sprite but its value can be accessed or modified
                  by other sprites used in the project.

                  LOCAL VARIABLES

                  Local variables can only be accessed or modified from the sprite where it was created.

                  CREATING A VARIABLE

                   To create a variable, follow the given steps:


                                                                                       4  Select whether the block
                                                              2  Click on Make a       is ‘For all sprites’ or ‘For this
                                                             Variable.
                                                                                       sprite only’.





                                                              3   Type a name
                                                              in  New variable
                                                              name box.








                          1  Click on the Variables Block.                                5  Click on OK button.




                              SENSING BLOCKS


                  Sensing    blocks    give   answers     when     asked     a   question.    Sensing    blocks    are
                  colour-coded with a light-blue shade and are used to detect different sprites and elements of
                  a project including the edge of the stage. They control the movement of the sprite in a better
                  manner. The table given below outlines the code blocks that fit into this category:



                   84   Premium Edition-VI
   81   82   83   84   85   86   87   88   89   90   91