Skip to content

Getting active

Unit of work

5 lessons


7-11 yrs

This series of five lessons is aimed at students aged 10-11 years. They are introduced to variables and develop their understanding of planning, coding and debugging through a mixture of unplugged and practical programming activities.

Students use variables to design and program the micro:bit to be star-jump and step counters. They then use random numbers and selection to code a times table test and an activity selector.

Computational thinking:







Overall key learning

  • can analyse problems in computational terms, and have repeated practical experience of writing computer programs in order to solve such problems
  • are responsible, competent, confident and creative users of information and communication technology

Additional skills

Creative thinking, collaboration, problem-solving, debugging, evaluation.

Lesson 1: Describing with variables

In this ‘unplugged’ lesson, pupils develop their understanding of variables. They use variable names and values to retell stories and use variables to describe characters before changing variables to describe the number of sides different shapes have.

Key learning:

  • To know and understand what variables are
  • To use variables to describe a character
  • To write algorithms that use variables
Lesson 1 details

Lesson 2: Using variables in programs

Pupils apply their understanding of variables to record star-jumps and write an algorithm to represent this. They explore a program using variables and debug it so the BBC micro:bit can be used to record an activity.

Key learning:

  • To write algorithms that use variables
  • To explain how variables are used in programs
  • To debug programs containing variables
Lesson 2 details

Lesson 3: Programming step-counters

Pupils consider how activity trackers record the number of steps a person takes and write algorithms to represent this. They then use the MakeCode editor to use the BBC micro:bit as a step-counter and evaluate its effectiveness.

Key learning:

  • To identify the uses of a step-counter
  • To write an algorithm for a step-counter
  • To program the BBC micro:bit as a step-counter
Lesson 3 details

Lesson 4: Random activities

Pupils complete a times table test using the BBC micro:bit and identify how variables and random numbers have been used, before modifying it. They consider how variables and random numbers can be used to help a family become more active with micro:bit and write an algorithm to follow next lesson.

Key learning:

  • To predict how variables will be used in programs
  • To understand how a variable can be set to a random number
  • To write algorithms that use random number variables
Lesson 4 details

Lesson 5: Programming an activity picker

Pupils apply their understanding of variables and random numbers by writing, testing and debugging a program to use micro:bit as a family activity selector, following their algorithm. They then evaluate their work.

Key learning:

  • To debug programs involving random number variables
  • To write programs that use random number variables
  • To evaluate a solution effectively
Lesson 5 details

These lessons are mapped to the following learning objectives and standards for computing and science.