Intermediate
60 mins
Teacher/Student led
+85 XP
Teacher-led from the board — pupils need no device

Algorithms and Debugging: Unplugged to Sequenced

Pupils write precise step-by-step instructions for real tasks and identify unnecessary detail. They find and fix a deliberate bug in another group's algorithm. Finally they build and debug a sequenced robot route within a step limit.

Teacher Class Feed

Load previous activity
    Your turn
    Your teacher is running this lesson on the board. Here is the part you can try yourself.
    Group discussion
    Investigation

    1 - Getting Started ~5 mins

    Illustration for Getting StartedTraffic lights, a cake recipe, a bus-stop announcement: each one follows a fixed order of steps. What happens if one step is missing or in the wrong place?

    Today you write precise step-by-step instructions for a real classroom job. Then you change one step so the job goes wrong, swap with another group, and hunt for the mistake they hid in their steps. Finding that mistake and repairing it is the main work of the lesson. After that we try the same thinking on a robot route on the board.

    2 - Precise Steps, Bugs and Fixing Them ~8 mins

    Illustration for Precise steps, bugs and fixing themWatch how I write steps for watering the classroom plant. Which details would you keep, and which would you leave out?

    Key point

    Those ordered steps are an algorithm. When a step is wrong or missing, that mistake is a bug. Finding the mistake, fixing it, and testing again is debugging.

    3 - What Details Matter? ~7 mins

    Here is the classroom job we are all thinking about for the next two minutes: put three story books back on the class library shelf in alphabetical order by the author's surname.

    With your group, call out steps you would keep in the instructions and details you would leave out. Be ready to say why. Which step, if it were missing, would make the job fail? Which detail sounds important but does not change where the books end up?

    4 - Write, Break and Fix ~18 mins

    Quick class vote first: which change is most likely to make a job fail — a missing step, steps in the wrong order, or a wrong direction? (An extra step that does nothing is usually clutter, not a bug.)

    Your group has one task card. Work through these jobs in order:

    1. Write a clear algorithm on the step cards (5 to 8 steps).
    2. Test: one person follows the steps exactly while the others watch.
    3. Break exactly one step so the job fails.
    4. Swap card packs with the group you are paired with.
    5. Find and fix their bug.
    6. Test again to check the fix works.

    5 - Record the Algorithm and the Fix ~8 mins

    On your Investigation Journal page, record four short notes about the work you have just done. Keep each note to one or two lines. Here is what a finished set looks like, using the library job as the example:

    • Steps: 1. Pick up the three books. 2. Check each author's surname. 3. Put them on the shelf in surname order. 4. Check the row is A to Z.
    • Bug: Step 3 said "put the books anywhere on the shelf".
    • Fix: Changed step 3 to "place in alphabetical order by surname".
    • Left out: The colour of the covers, because it does not change the sort.

    Now write your own four notes: your group's steps, the bug you found in the other group's cards, the fix that worked, and one detail you decided to leave out because it would not change the result.

    Pupil practice · Investigation Journal
    Module 4 · Technology: IPO, Algorithms, Makecode Arcade and Micro:bit
    Lesson 24 · Algorithms and Debugging: Unplugged to Sequenced
    Download Investigation Journal sheet (PDF)
    123learn · Online learning platform

    Unlock the full learning experience

    You're previewing this lesson. Get full access to this lesson and hundreds more — each one ready to teach, with interactive activities, printable resources and pupil progress tracking built in.

    Hundreds of curriculum-aligned lessons
    Interactive activities in every lesson
    Printable resources & progress tracking
    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