Assessment 6.4
Assessment 6.4
Which of these are features of a variable? Tick all that apply.
Can be set
Can be changed
Can store lots of different data
Can store pictures
Which data types can a variable hold?
Numbers Only
Letters Only
Numbers and Letters
Videos
How many values can a variable hold at any one time?
None
One
Two
Three
When a variable is changed, what happens to the value?
A. It is replaced by a new value
B. It is joined by the new value
C. It is added to the new value
In a bat and ball game, which of these parts of the game would be stored using a variable? Tick all that apply.
Points Scored
Movement of Sprite
Lives Lost
Time Left
Appearance of the Stage
Where is the value of a variable usually set?
A. At the beginning of a program
B. Throughout the running of a program
C. At the end of a program
D. When triggered by an event
The code snippet below controls the movement of a ball in a game in the style of table tennis. The Stage is also shown next to the code. When will the score change?
A. When the ball moves
B. When the ball touches the paddle
C. When the green flag is clicked
D. When the ball hits the edge