Improving a game
I can choose how to improve a game by using variables.
Improving a game
I can choose how to improve a game by using variables.
These resources will be removed by end of Summer Term 2025.
Switch to our new teaching resources now - designed by teachers and leading subject experts, and tested in classrooms.
These resources were created for remote use during the pandemic and are not designed for classroom teaching.
Lesson details
Key learning points
- Variables can be updated at specific points in a program.
- An event in a program can be used to set a variable.
- A program can use the value of a variable.
Keywords
Score - a named value which will track player points
Selection - part of a program where, if a condition is met, then a set of commands is run
Operator - a symbol used to compare values
Common misconception
I put the "change score by" block in my code, but the score isn't changing when I expect it to.
The location of your "change score by" block dramatically affects when and how often the score changes.
To help you plan your year 6 computing lesson on: Improving a game, download all teaching resources for free and adapt to suit your pupils' needs...
To help you plan your year 6 computing lesson on: Improving a game, download all teaching resources for free and adapt to suit your pupils' needs.
The starter quiz will activate and check your pupils' prior knowledge, with versions available both with and without answers in PDF format.
We use learning cycles to break down learning into key concepts or ideas linked to the learning outcome. Each learning cycle features explanations with checks for understanding and practice tasks with feedback. All of this is found in our slide decks, ready for you to download and edit. The practice tasks are also available as printable worksheets and some lessons have additional materials with extra material you might need for teaching the lesson.
The assessment exit quiz will test your pupils' understanding of the key learning points.
Our video is a tool for planning, showing how other teachers might teach the lesson, offering helpful tips, modelled explanations and inspiration for your own delivery in the classroom. Plus, you can set it as homework or revision for pupils and keep their learning on track by sharing an online pupil version of this lesson.
Explore more key stage 2 computing lessons from the Using variables in programming to develop a game unit, dive into the full primary computing curriculum, or learn more about lesson planning.
Equipment
Pupils will need access to a device with block-based programming software. Examples in this lesson use Scratch https://oak.link/scratch
Licence
Prior knowledge starter quiz
6 Questions
Q1.What is the name for a space in memory that stores a single value in a program?
Q2.What must every variable have?
Q3.What does it mean to "set" a variable in a program?
Q4.What can the value of a variable do when a program runs?
Q5.Put these steps in order for using a variable in a game:
Q6.Match each example to the correct keyword:
variable
value
set
change
Assessment exit quiz
6 Questions
Q1.What does "selection" mean in a program?
Q2.What is the operator used in programming to compare two values and check if the initial value is less than the following one?
Q3.What is the main job of an event in a program?
Q4.Match each example to the correct keyword:
checking whether the score is greater than 10
increasing the score when a coin is collected
running code only when the score is high enough
player presses the space bar to jump