Skip to content

Study Hub

Study Guides

This pupil-friendly study guide includes a unit summary, clear notes, common mistakes, and quick questions with answers.

Year 6 - Computing

Updating and changing values in a variable

Using variables in programming to develop a game

Unit Summary

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.

Lesson Summary

You will learn to explain why a variable is used in a program.

Key Notes

  • A program variable is a placeholder in memory for a single value.
  • A variable must be named and hold data.
  • The value of a variable can be changed by running a program.

Vocabulary To Learn

  • variable: a named piece of data stored in a computer's memory which can be accessed and changed by a computer program
  • change: to update the value of something in a program
  • set: to give a variable a starting value in a program
  • value: the data stored in a programming variable which can be used or changed

Common Mistakes To Avoid

  • Why does the variable name matter? Can't I just call it "Number" or "Variable_A"?

3 Quick Questions (With Answers)

1. Describe the system or process from this lesson in clear steps.

A program variable is a placeholder in memory for a single value. A variable must be named and hold data.

2. Define this computing term and give one practical example. 'variable'

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.

3. Correct this common computing misconception.

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.

More Lessons In This Unit

Browse all guides in the Year 6 Computing guide library.