Unplugged Lesson
Beginner
40 mins
Teacher led
+50 XP
What you need:
IWB/Projector/Large Screen

The Power of Loops

Hey there! In this lesson, you'll explore advanced loops to repeat actions efficiently. You'll create a fun workout using variable loops, follow exercise sequences, and build your own patterns. Grab paper, coloured pencils, and a die to get started!
Learning Goals Teacher Notes

Teacher Class Feed

Load previous activity

    1 - Introduction

    In this lesson, you'll discover how to write a program that can repeat an action over and over without writing the same thing lots of times. A variable loop is a type of loop where the number of repeats can change. This allows programs to adapt and respond to new information.

    To make this concept exciting, we'll build a great unplugged workout using loops! You'll roll a six-sided die to determine how many times you repeat each exercise, creating a new challenge every time.


    Students will need:

    • Sticky Notes/Card

    • Coloured pencils

    • A six-sided die (or you can make one by writing numbers 1 to 6 on slips of paper and picking one randomly).

    2 - Exercise Algorithms

    Explain that we’ll follow a fixed sequence in a particular order.

    On your screen, show the "Exercise Trio" and press Shuffle to deal a new set of three moves. Read them from left to right and lead the class through them in that exact order.

    For each exercise, have the students perform the move for three slow counts. Make sure you offer a seated version if needed to accommodate everyone.

    After they’ve completed one round of all three moves, stop.

    Now, shuffle again for a fresh sequence and run through 3–4 rounds. As you do, remind the students that the on-screen order is the algorithm they must follow. Be sure to keep movements small and ensure there's clear space around all the desks.



    3 - Loop It Up

    Now, let's add a new layer to our workout: loops.

    Explain that a loop simply means we repeat the same action a set number of times before moving on. This helps us write shorter, more efficient programs. For example, if a move shows x3, you perform that move three times, and then you continue to the next one.

    On your screen, show the Exercise Pattern (with Loops) and press Shuffle to deal three moves. Any exercise tile with a coloured ring and x2 or x3 is repeated that many times. Remind your students that any tile without a ring is done only once. Continue to keep each move to 3 slow counts.

    After each round, check for understanding. Ask questions like, "Which move did we repeat?" or "How did we know to repeat it?"

    Highlight that the loop (the coloured ring and the x) applies only to the single move it's attached to, making our programs much easier to read and follow. Shuffle for a fresh pattern and run 3-4 quick rounds.


    4 - Your Variable Loop Workout

    Now, let's put what we've learned into practice!

    Put your pupils into groups of 3-4 and give each group six blank cards (or sticky notes) and a marker.

    Their first challenge is to become programmers and create their own workout algorithm. Have them come up with one exercise per card, with a clear name and a simple drawing. Moves should be small and classroom-safe, like toe taps, marching in place, or arm circles.

    When they're ready, have each group shuffle their deck and lay out three cards from left to right to create their workout pattern.

    Now, each group will roll a six-sided die for each card to determine how many times they repeat the exercise.

    Remind them that the number on the die is the variable that makes their loop change each time!

    5 - Let's Do It Together!

    Now, bring the class together and gather up all of the exercise cards that they have created. Explain that for our final workout, we'll become one big program! Stick 4/5 exercises up on the board.

    Tell them you'll call on a student to roll the die, and the number they roll will determine how many times everyone performs the next exercise. This is our variable in action—it changes the number of times our loop runs.

    Lead the class through the workout. Have one student roll the die, then announce the exercise and the number of repetitions.

    For example, "Sarah rolled a 4, so we'll do 4 jumping jacks!"

    Repeat this process for 3-4 different exercises to give every student a chance to participate. This final workout is the perfect example of a variable loop in action.

    Unlock the Full Learning Experience

    Get ready to embark on an incredible learning journey! Get access to this lesson and hundreds more in our Digital Skills Curriculum.

    Copyright Notice
    This lesson is copyright of Coding Ireland 2017 - 2025. Unauthorised use, copying or distribution is not allowed.
    🍪 Our website uses cookies to make your browsing experience better. By using our website you agree to our use of cookies. Learn more