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

Introduction to Algorithms

Teacher Class Feed

Load previous activity

    1 - What is an Algorithm?

    Hello Teacher! Start the lesson by gathering your 7-8 year old pupils in a circle. Explain that an algorithm is like a recipe or a set of clear steps to do something, such as making a sandwich. Tell them that today, they will learn about algorithms by programming you, the teacher, as a robot to make a sandwich. Emphasise that robots follow instructions exactly as said, which can lead to funny mistakes if the steps aren't precise.

    2 - Set Up the Robot Activity

    Prepare simple sandwich ingredients on a table: bread slices, butter, jam, a knife, and a plate. Explain to the pupils that you will act as the 'Robot Teacher' and only do exactly what they say, no more, no less. Invite the class to give you spoken instructions one by one to make the sandwich. Intentionally follow their words literally to expose bugs – for example, if they say 'put the butter on the bread' without specifying how, you might pretend to put the whole tub on the bread or on the floor. This will create humorous errors to highlight the need for precision.

    3 - Find and Fix the Bugs

    After each attempt, pause and discuss with the pupils what went wrong – these are 'bugs' in the algorithm. Ask questions like: 'Why did the robot put the butter on the floor?' or 'What words could we use to make it clearer?' Have the class refine the instructions and try again, building a better set of steps together. Repeat until the sandwich is made correctly. This teaches debugging and the importance of clear, sequential steps.

    4 - Create Your Own Algorithm

    Now, have each pupil draft their own algorithm for making a sandwich on paper. They should write or draw ultra-precise steps, like 'Pick up the knife with your right hand' or 'Spread the butter on one side of the bread slice.' Encourage them to think about order and details to avoid bugs.

    5 - Test It Aloud

    Finish by having pupils pair up and test their algorithms aloud. One acts as the robot, following the other's instructions literally, while the other reads their steps. Switch roles, then discuss as a class what worked well and what needed fixing. Congratulate them on creating their first algorithms and explain how this relates to computers following precise instructions.

    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. 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