SPIKE™ Prime Set

Repeat 5 Times

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

30-45 min.
Grades 6-8

Lesson Plan

1. Prepare

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

Engage (5 Min.)

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

Explore (15 Min.)

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

Explain (10 Min.)

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

Elaborate (15 Min.)

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

6. Evaluate

  • Give feedback on each student's performance.
  • You can use the assessment rubrics provided to simplify the process.

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 students to think of situations where they see counting features in their everyday life:

    ▷ Numbers of emails
    ▷ Likes on social media
    ▷ Available free spaces in parking garages

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

Have your students 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 your students have built the model with the motors correctly aligned, as shown in the building instructions. This will make programming easier.


Yannick Dupont, 2013-2020

Coding Tips

Main Program

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

Possible Solution

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

Other Programs

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


Simplify this lesson by:

  • Doing an unplugged activity dealing with variables before starting the lesson

    ▷ Use a glass jar (to symbolize the variable) and gradually something to it, like marbles
    ▷ Explain 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 students to modify their programs to count the different types of sit-ups and display the different values
  • Using a tablet and programming Leo to move following the movements of the tablet

Assessment Opportunities

Teacher Observation Checklist
Create a scale that matches your needs, for example:

  1. Partially accomplished
  2. Fully accomplished
  3. Overachieved

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

  • Students can accurately describe the concept of a variable.
  • Students can create and correctly use a variable in their programs.
  • Students can use a variable to count different values.

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

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

Encourage your students to provide feedback to others by:

  • Having one student score the performance of another using the colored brick scale above.
  • Asking them to present constructive feedback to each other so that they can improve their group's performance during the next lesson.

Language Arts Extension

To incorporate language arts skills development:

  • Have your students find examples of training programs and explore the differences between them. 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 workout programs.

Note: This will make for a longer lesson.


Math Extension

To incorporate math skills development:

  • Have your students 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 done by Leo.
  • Have them extract the math relation of that graph (y=mx+b)

Note: This will make for a longer lesson.


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

  • Education And Training (Teaching)
  • Health Science (Biomedical)
  • Health Science (Medical & Health Careers)
  • Information Technology (Game Programming)

Teacher Support

Students will:

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

Create clearly named variables that represent different data types and perform operations on their values.

Present claims and findings, emphasizing salient points in a focused, coherent manner with relevant evidence, sound valid reasoning, and well-chosen details; use appropriate eye contact, adequate volume, and clear pronunciation.

Integrate multimedia and visual displays into presentations to clarify information, strengthen claims and evidence, and add interest.

Interpret the equation y = mx + b as defining a linear function, whose graph is a straight line; give examples of functions that are not linear.

Construct a function to model a linear relationship between two quantities. Determine the rate of change and initial value of the function from a description of a relationship or from two (x, y) values, including reading these from a table or from a graph. Interpret the rate of change and initial value of a linear function in terms of the situation it models, and in terms of its graph or a table of values.

Student Material

Student Worksheet

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