Skip to content
Menu

Year 6 · Computing · Variables and games · Lesson 1

What is a variable?

Variables in block-based programming: named stores for values, set versus change, tracing values, resetting at the start, and naming.

Whiteboard video lesson: What is a variable?

13-minute video lesson

Teaching, worked examples and 20 practice questions solved step by step.

Watch free for a month

What your child will learn

  • Explain what a variable is
  • Use set and change
  • Trace variable values
  • Choose meaningful names

The method

  1. Clear name.
  2. Set at start.
  3. Change on events.
  4. Show/test.

Key words: variable, set, change, score, trace, event.

Worked examples

The first three practice questions from the lesson, with every step.

Question 1

What is a variable?

  1. Step 1: Store

Answer: a named store for a value that can change

Question 2

Why is it called a ‘variable’?

  1. Step 1: Vary

Answer: its value can vary (change)

Question 3

What does ‘set score to 0’ do?

  1. Step 1: Replace

Answer: makes score equal 0