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

Introduction to Algorithms

In this lesson, you'll explore what an algorithm is through a fun, hands-on activity. Follow step-by-step instructions to program a robot in a sandwich-making task, learning the importance of clear, precise directions for successful results.
Learning Goals Learning Outcomes Teacher Notes

Teacher Class Feed

Load previous activity

    1 - What is an Algorithm?

    An algorithm is simply a set of clear, step-by-step instructions for completing a task.

    Think of it like a recipe for making a cake or the directions for building a LEGO model. The goal of this lesson is to demonstrate how important it is for those steps to be precise.

    This lesson will include a hands-on activity that shows how computers follow instructions literally, and even a tiny mistake in the instructions can have an unexpected result.

    2 - Programming the Robot

    Gather your pupils in a circle and place all the sandwich-making ingredients and tools (like a plate, knife, bread, butter and jam) in front of you. Tell them it's time to program their robot! Explain that they are the programmers, and you are the robot.

    You have no common sense or prior knowledge about making a sandwich, so you can only follow their instructions exactly as they're given!

    You should adopt a monotone voice and rigid movements to reinforce this persona.

    3 - The First Attempt

    Prompt the students for the very first instruction to make a sandwich. Follow their command literally, no matter how illogical it seems. For example:

    • If a student says, "Open the jar," try to pull the lid straight off.

    • If they say, "Put the bread on the plate," pick up the entire loaf of bread and place it on the plate.

    • If they say, "Spread the peanut butter," pick up the entire jar and try to smear it on the bread.

    Continue to follow their instructions, exaggerating any mistakes to highlight why being clear and specific is so important.

    4 - Debugging the Program

    After the first attempt, stop and discuss the results.

    Ask the students: "What went wrong?" and "Why didn't my program work?" Explain that what they just did is called debuggingโ€”the process of finding and fixing mistakes in an algorithm.

    Point out that the problem wasn't their idea, but the way they communicated the steps.

    This shows them that a great idea needs a great, precise set of instructions.

    5 - Writing a Clear Algorithm

    Have the students work together to create a new, more precise set of instructions. Prompt them to think about every small detail, such as "pick up a single slice of bread" and "unscrew the lid from the jam jar."

    You may want to write their new, clear algorithm on a whiteboard or a large piece of paper, writing each step on a new line to reinforce the sequential nature of code.

    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