Year 6 - Computing
Updating and changing values in a variable
Using variables in programming to develop a game
Study Hub
This pupil-friendly study guide includes a unit summary, clear notes, common mistakes, and quick questions with answers.
Year 6 - Computing
Using variables in programming to develop a game
This unit explores the concept of variables in programming through the development of games. Pupils will investigate what variables are and relate them to real-world examples of values that can be set and changed. Then they use variables to create a simulation of a scoreboard.
You will learn to explain why a variable is used in a program.
A program variable is a placeholder in memory for a single value. A variable must be named and hold data.
a named piece of data stored in a computer's memory which can be accessed and changed by a computer program. Add one real device or system example to prove understanding.
Mistake: Why does the variable name matter? Can't I just call it "Number" or "Variable_A"? Correction: You can call a variable anything you like but it's not very helpful for someone wanting to understand what your program does. The name of a variable should clearly identify what data it will hold as the program runs.
Browse all guides in the Year 6 Computing guide library.