Page 87 - TP_Prime_v2.2_Class_5
P. 87
The variable appears in the list of Variables blocks. Observe that the variable
name fruit appears in all the blocks.
Now create the following script:
Every time you type CONDITIONAL BLOCKS IN SCRATCH
Fun
Fact! a name or number,
the previous value
in the variable gets
deleted and the new
value is stored.
85
The sprite will ask you to type your favourite fruit. When you press the Enter key, the
name of the fruit appears in the speech bubble of the penguin. The name of the fruit
then appears in the answer as well as in the variable name on the stage.
This variable Fruit is a string variable as we are saving names in the variable. If you
save numbers in a variable, say, Mobile, it will be a numeric variable.
Suppose, you have to code a dance party in Scratch where characters keep
dancing in a loop until stopped? Which block will you use for this and which
songs would you play in the program?

