Page 59 - ModularV1.1 _c5_flipbook
P. 59
The three relational operators are:
greater than
Similarly, you can use the other blocks to perform less than and equals
to .
Logical Operators
Using logical operators, you can combine two or more relational operators to
produce a single true/false result. These blocks allow you to further refine your
comparison of values.
The result is true only if the two expressions are true
The result is true only if either of the expressions is true
The result is true only if the expressions are false
VARIABLES
Variables are used to hold values. These are the data values for which the value
can be changed when the code is being processed. In Scratch, the variables can be
created using Data blocks. To create a variable, follow these
steps:
Step 1 Click on Data category of blocks.
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.
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 the OK button.
Advanced Blocks in Scratch 57

