Page 64 - IT_V5.0_Class6
P. 64
Example 6: Make a sprite display the sum of two numbers in a think bubble.
Sensing Blocks
Sensing blocks in Scratch are used to detect different conditions and interactions within a project,
such as when sprites touch something, track the mouse's position, or measure time. They allow
the program to react based on these inputs. Sensing blocks and their functions are as follows:
Block Explanation
Asks a question and waits for the user's input.
It reports the answer given by the user.
Variable Blocks
In Scratch, variable blocks are used to store and manage data values that can change throughout
a project. These blocks can hold either variables or lists. Variables are specifically designed to
store numbers or text, making them useful for tracking data that may vary as the program runs.
Variable blocks and their functions are as follows:
Block Explanation
It creates a new variable that can be used in the project.
It represents the value of the variable named "my variable."
The name can be changed to anything meaningful.
It sets the value of the variable to a specified value.
It changes the value of the variable by a specified amount.
It displays the variable's value on the stage.
It hides the variable's value from the stage.
62 Information Technology (V5.0)-VI

