SPIKE™ Prime Set

Repeat 5 Times

Use variables to count the number of sit-ups and calories burned during a training session.

30-45 min.
Years 7-9 or Key Stage 3

Lesson plan

1. Prepare

  • Read through the pupil material in the LEGO® Education SPIKE App.

2. Engage (5 Min.)

  • Use the ideas in the Ignite a Discussion section below to engage your pupils in a discussion relating to this lesson.
  • Explain the lesson.

3. Explore (15 Min.)

  • Have your pupils work in pairs to build Leo, the personal trainer.
  • Ask them to play the program in order to make sure that Leo is working correctly.

4. Explain (10 Min.)

  • Challenge your pupils to use variables to count Leo's sit-ups.

5. Elaborate (15 Min.)

  • Ask your pupils to add a second variable to their programs, it should calculate the number of calories they'd burn by doing sit-ups themselves.
  • Have them modify and customise their models.

6. Evaluate

  • Give feedback on each pupil's performance.
  • In order to simplify the process, you can use the assessment rubrics that have been provided.

Ignite a Discussion

Start a discussion about exercise.

  • Talk about training programs for athletes, rehab after injuries, elderly people, etc.
  • Explore the concept of counting by asking your pupils to think of situations in which they see counting features in their everyday lives:

    ▷ Number of emails
    ▷ Number of likes on social media
    ▷ Number of free spaces available in car parks

  • Ask your pupils to describe what they think a variable is.

Have your pupils watch this video to see what they're about to do.


Building Tips

Go Slow on Speed
It's best to activate this model with the Medium Motors at 75% speed.


Align Motors Correctly
Make sure that your pupils have built the model with the motors correctly aligned as shown in the building instructions. This will make the programming task easier.


Coding Tips

Main Program

SPIKE Life Hacks Repeat-5-times Step03-Program - en-gb

Possible Solution

SPIKE Life Hacks Repeat-5-times Teacher-Solution - en-gb

Other Programs

SPIKE Life Hacks Repeat-5-times Teacher Other - en-gb


Simplify this lesson by:

  • Doing an unplugged activity covering variables before starting the lesson

    ▷ Using a glass jar (to symbolise the variable) and gradually adding something to it, like marbles
    ▷ Explaining that a variable is like a jar that keeps some information (i.e. the marbles) in its memory

Take this lesson to the next level by:

  • Adding different tempos to the sit-ups (e.g. 2 slow and 3 fast)
  • Asking your pupils to modify their programs to count the different types of sit-ups and then display the different values
  • Programming Leo to follow the movements on a tablet

Assessment Opportunities

Teacher Observation Checklist
Establish a scale that suits your needs, for example:

  1. Partially accomplished
  2. Fully accomplished
  3. Overachieved

Use the following success criteria to evaluate your pupils' progress:

  • The pupils are able to accurately describe the concept of a variable.
  • The pupils are able to create and correctly use a variable in their programs.
  • The pupils are able to use a variable to count different values.


Have each pupil choose the brick that they feel best represents their performance.

  • Blue: I've created a variable to count the number of sit-ups Leo completed.
  • Yellow: I've added a second variable to count the number of calories burned.
  • Violet: I've modified my program to create different exercise tempos and routines.

Encourage your pupils to provide feedback to one another by:

  • Having one pupil use the coloured brick scale above to score another pupil’s performance
  • Asking them to present constructive feedback to one another so that they can improve their group’s performance during the next lesson

Language Arts Extension

To incorporate the development of language arts skills:

  • Have your pupils find examples of training programs and explore their differences. Have them link the type of exercise and number of reps to the effect it would have on the body.
  • Have them create a presentation about different training programs.

Note: This will require additional time.


Maths Extension

To incorporate the development of maths skills:

  • Have your pupils explore linear relations in various ways.
  • Have them trace a linear graph of the value of the different variables (e.g. count, calories, work) in relation to the number of sit-ups completed by Leo.
  • Have them extract the maths relation that graphs (y=mx+b).

Note: This will require additional time.


The pupils who enjoyed this lesson might be interested in exploring these career pathways:

  • Education and Training (Teaching)
  • Healthcare Science (Biomedical)
  • Healthcare Science (Medical and Health Careers)
  • Information Technology (Game Programming)

Teacher Support

The pupils will:

  • Declare multiple numeric variables
  • Perform simple maths operations on the variables

LEGO Education SPIKE Prime Set

CAS Computing Progression Pathways

Designs solutions (algorithms) that use repetition and two-way selection i.e. if, then and else. (AL)

Understands that iteration is the repetition of a process such as a loop. (AL)

Programming and Development:
Declares and assigns variables. (AB)

Uses a variable and relational operators within a loop to govern termination. (AL) (GE)

Data and Data Representation:
Analyses and evaluates data and information, and recognises that poor quality data leads to unreliable results, and inaccurate conclusions. (AL) (EV)

Pupil Material

Student Worksheet

Download, view or share as an online HTML page or a printable PDF.