Page 61 - Computer - 6
P. 61
The sample images for the project are given below.
Lab Activity 2 Experiential Learning
Let us create a variable called Number, set its initial value to 10, and hide the variable. Each time the
space key is pressed, the value of the variable is increased by 5, and the sprite displays the new value
of the variable.
1. Create a new project.
2. In the Variables blocks palette, create a variable – Number.
3. In the Scripts area, create the stack of blocks as shown in the image.
4. Click the Go button to execute the project.
5. Press the spacebar key and observe the result.
6. Click the Stop button to end the project.
The sample images for the project are given below.
Changing Appearance of the Variable
A variable can be displayed in three forms. These are:
• Normal Readout: The Normal Readout option displays the name of the
variable and its value on the Stage.
• Large Readout: The Large Readout option displays only the value of the
variable in a larger size than normal readout.
• Slider: The Slider option displays the name and value of the 2 2
variable, along with a slider to change the value of the variable.
The range of value for the slider is from 1 to 100. 3
To change the appearance of a variable:
1. Select the variable to display on the Stage.
2. Right-click the display of the variable on the Stage.
A list of options appears.
3. Select the appearance option for the variable from the list.
The variable is displayed as per the selected option.
59