Page 65 - IT_V5.0_Class6
P. 65

Follow the given steps to create a variable:
                 Step 1:  Click on the Variables category.

                 Step 2:  Click on the Make a Variable button. The New Variable dialog box appears.
                 Step 3:  Type the name for the variable in the New variable name text box.
                 Step 4:  Click on the OK button. The variable N1 is created.
                 Step 5:  Similarly, create another variable named N2.





                                                         2
                                                             3












                                                                                 4
                    1

                 Now you can use this variable to store a value.

                 Control Blocks

                 Control blocks in Scratch manage the flow of a program. These blocks are used to decide how
                 and when certain actions will occur, such as repeating tasks, making choices, or pausing scripts.
                 They enable more advanced and dynamic behaviours in projects by allowing loops, conditional
                 statements, and deciding when certain blocks should run. Control blocks and their functions are
                 as follows:
                  Block                                Explanation


                                                       It pauses the script for the specified number of seconds.




                                                       It repeats the blocks inside this loop a specified number
                                                       of times.




                                                       It repeats the blocks inside this loop indefinitely.






                                                       It runs the blocks inside if the specified condition is true.








                                                                                              Learning Scratch   63
   60   61   62   63   64   65   66   67   68   69   70