Lesson details

Key learning points

  1. In this lesson, we will add more variables to improve our games.

Licence

This content is made available by Oak National Academy Limited and its partners and licensed under Oak’s terms & conditions (Collection 1), except where otherwise stated.

Loading...

3 Questions

Q1.
How does using a plan you help complete a programming task?
It ensures there won't be any errors in your code
Correct answer: It helps guide your coding
It means you can't change your mind later
Q2.
Variables can be given almost any name. Why is it important to choose variable names carefully? (Tick 2 boxes)
Correct answer: It makes code easier to read
Correct answer: It makes it easier to understand what the variable is for
It makes the computer understand your program better
It makes the program run faster
Q3.
Why is it important to test your code?
To check your spellings
Correct answer: To make sure it does what you intended
To make sure the artwork is the right

3 Questions

Q1.
How many variables are being used in the code below?
1 - Time.
2 - Screen Bottom and Bowl.
Correct answer: 2 - Time and score.
4 - Time, Screen Bottom, Bowl and score.
Q2.
One variable is being updated in the code below. When and by how much is the variable changed?
The variable changes by - 4 every time the sprite touches the Screen Bottom.
Correct answer: The variable changes by + 1 every time the sprite is touching the bowl.
The variable won't change.
Q3.
Look at the code below. The loop will stop when the variable Time = 10. How many times will the program loop?
0
10
2
Correct answer: 5

Lesson appears in

UnitComputing / Variables in Games

Computing