Basic HTML Version

|  | Table of Contents |  | View Full Version

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

    Step 2  Click on the Make a variable button to open the New Variable dialog
                                box.

                      Step 3  Type  a  suitable  name,  for  example  N1  for  the  variable  in  the  Variable
                                name? text box.

                                                             New variable dialog box

                      Step 4  Select an option specifying whether the
                                variable is to be created For all sprites or
                                For this sprite only.
                      Step 5  Click on OK button.

                      Once a variable is created you can see some new
                      blocks as shown alongside.

                      The Table below shows the blocks and their functions:

                                                        Declares the value for the variable created

                                                        Changes the value of the variable by a defined

                                                        number

                                                        Displays variable on the stage

                                                        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 check mark will uncheck the
                      variable and remove it from the stage.

                      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.

                      Step 2  Click and drag the when green flag clicked block to the Script area.

                      Step 3  From the Variables category, click on Make a variable button.
                      Step 4  In the Variable name? text box, type N1 as the variable name.

                    132     Premium Edition-V

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