Page 48 - Code & Click - 6
P. 48
To rename a variable:
1. Right-click the variable in the blocks palette.
2. Select the Rename variable option. 3
3. Type the new name for the variable and click
the OK button.
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.
2. Select the Delete option. 2
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.
Operators Blocks
The Operators blocks let you work with various operators. These blocks are colour-code green. These
are reporter blocks that fit into similar-shaped slots of other blocks.
Mathematical Operator Blocks
Mathematical operators are used to perform mathematical calculations on numeric values.
Block Description
Adds the two specified values.
Subtracts the second value from the first value.
Multiplies the specified values.
Divides the first number by the second number and displays the quotient.
Divides the first number by the second number and displays the remainder.
46