Page 62 - Computer - 6
P. 62

Renaming a Variable

          A variable can be renamed to reflect the type of value it stores and displays.
          To rename a variable:
            1.  Right-click the variable in the blocks palette.
                 A list of options appears.                              1
            2.  Select the Rename variable option.

                 The Rename Variable dialog box opens.
                                                                                                     2

                                                             3.  Type the new name for the variable and click the

           3                                                     OK button.
                                                                 The variable is renamed.



          Deleting a Variable

          A variable should be deleted if it is of no use anymore.
          To delete a variable:                                   1
            1.  Right-click the variable in the Blocks palette.
                 A list of options appears.                                                                         2
            2.  Select the Delete option.
                 The variable is deleted from the list of variables and is no longer displayed on the Stage.

          Some More Blocks in Scratch 3
          Let us learn about some more blocks that help us make our projects more interactive and interesting.

                  Block            Category                                  Description
                                                  Asks a question and waits for the user to input an answer in the
                                    Sensing
                                                  text box on the Stage. (The input is stored in the answer variable)

                                    Control       Stops all scripts in a project from execution.

                                                  Repeats the enclosed stack of blocks until the specified condition
                                    Control
                                                  becomes True.

                                                  Executes  a  script  when  the  backdrop  of  Stage  changes  to  the
                                     Events
                                                  specified backdrop.
                                     Events       Executes a script when a specified sprite is clicked on the Stage.


          WORKING WITH OPERATORS
          An Operator is a symbol that is used to perform a task or carry out a specific action. For example, the

          difference operator ‘-’ denotes the process of subtraction of two numbers. The values on which the
          operator performs the task are called Operands. Different operators work with one or more operands.
          For  example,  the  product  operator  ‘*’  requires  at  least  two  operands  to  carry  out  the  process  of
          multiplication.


               60
   57   58   59   60   61   62   63   64   65   66   67