Page 108 - Touchpad_Plus_V3.2_Class 5
P. 108
3. equal 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.
Operator Meaning
The result is true only if the two expressions are true.
1. AND
The result is true only if either of the expressions is true.
2. OR
The result is true only if the expressions is false.
3. NOT
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. There are two ways in which
the values can be assigned to the variables—by the
programmer and by the user.
Each programming language has a method or syntax
for defining variables. In Scratch, the variables can be
created using Variables blocks.
To create a variable, follow these steps:
Step 1 Click on Variables category of blocks.
Step 2 Click on 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 New variable name text box. Variables block
106 Plus (Ver. 3.2)-V

