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

Repeating Actions (Loops)

Hey there! In this lesson, you'll explore the power of loops to repeat actions efficiently. Using variable loops, you'll create a fun workout with exercises. Grab paper, coloured pencils, and a die to get started with exciting patterns!
Learning Goals Teacher Notes

Teacher Class Feed

Load previous activity

    1 - Introduction

    In this lesson, you'll learn 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 an unplugged workout using loops!

    You will need:

    • Paper

    • 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 - Following a Fixed Algorithm

    Today, we'll put our sequencing skills to the test. Explain that we'll follow a series of instructions—an algorithm—in a fixed order, just like we would with a computer program. However, today our steps will be simple exercises.

    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!

    Finally, have them perform their workout together. They should read the cards from left to right and repeat each move the rolled number of times before moving on to the next card. Run two patterns, then have the groups swap decks with a neighbouring group for a fresh set. Remind them that the on-table order is the algorithm they must follow!

    5 - Let's See Your Loops in Action

    Now that each group has created and tested their own programs, let's see how our ideas can work together. Walk around and collect some of the students' best exercise cards from various groups.

    Display a few of them on the board, arranging them in a simple sequence. This is a chance for the class to "run" a new program. Now, add a loop to one of the movements. You can do this by drawing a coloured ring around it and adding a simple x2 or x3.

    Explain that this shows how loops are a reusable part of code that we can add to any instruction. Lead the class through the new combined sequence, making sure to perform the looped move the correct number of times.

    After you've completed the round, ask the class: "What did we have to do extra on this program?" This will highlight the purpose and function of the loop and reinforce the lesson's main point.

    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