Page 60 - ModularV1.1 _c5_flipbook
P. 60

This will make  available  some new  blocks below  the  Make a

                  Variable button in the Data category of blocks.

                  Following are the blocks and their functions.


                      set  N1   to                 Declares the value for the variable created

                   change  N1   by                 Changes the value of the variable by a defined number


                    show  variable N1              Displays variable on the stage


                    hide  variable  N1             Does not display variable on the stage


                  The variable created is placed on the stage at a new place. In the blocks area, the
                  variable name is checked by default. Clicking on the checkmark will uncheck the
                  variable and remove it from the stage.

                  Example: Aman wants to find the quotient when 12 is divided by 5.

                  The steps to do this are:
                  Step 1  Delete the cat sprite and add a new sprite Abby from the Library.


                  Step 2  Click and Drag  when            clicked  from the Events block to the stage.


                  Step 3  From the Data category, click on the Make a Variable button.

                  Step 4  In the Variable Name dialog box, type N1 as the variable name.














                  Step 5  Click on the OK button.

                  Step 6  Repeat steps 3 to 4 to create two more variables, N2 and Quotient.


                  Step 7  Click and drag  set       Quotient  to   block to Script area.
                  Step 8  Click on the drop-down arrow and select N1.


                  Step 9  Set the value of N1 as 12.
                  Step 10  Repeat Steps 7 to 9 to set the value of N2 as 5.


                  Step 11  Repeat Steps 7 to 9 to use the variable Quotient.



                  58      Modular (Ver. 1.1)-V
   55   56   57   58   59   60   61   62   63   64   65