Lesson 1 of 5 · Hawker Centre
Sequencing: a 45-minute coding lesson
A free 45-minute lesson on sequencing for ages 6–12. Students plan step-by-step instructions to deliver chicken rice in a Singapore hawker centre.
- 45 minutes
- Pairs, whole class
- One device per pair, plus a projector
Learning objectives
By the end of the lesson, students can:
- Explain that a program is a list of instructions followed in order.
- Write a sequence of moves and actions to reach a goal.
- Find and fix a bug when instructions are in the wrong order.
Key words
- Program:
- A set of instructions for a computer to follow.
- Sequence:
- Instructions carried out one after another, in order.
- Bug:
- A mistake in a program that makes it do the wrong thing.
- Debugging:
- Finding and fixing bugs.
You'll need
- One laptop, Chromebook or iPad per pair, open to dotcodecampus.com/maze/hawker/1. No accounts or installs.
- A projector or screen for the demo.
- Optional: the printable unplugged grid game for the warm-up, and certificates to finish.
Lesson flow
Minutes 0–8
Unplugged warm-up
- Ask a volunteer to be the "robot". They may only follow exact instructions: step forward, turn left, turn right.
- The class directs the robot from the door to a chair. Write each instruction on the board as it is given.
- Deliberately give one wrong step. Ask: what went wrong, and which line on the board do we change?
Minutes 8–15
Demo on the projector
- Open Hawker Centre level 1 on the projector (dotcodecampus.com/maze/hawker/1).
- Point out the robot, the tray it is holding, and the hungry diner. Ask the class how many squares away the table is.
- Drag the blocks in as the class calls them out, press Run, and celebrate the stars.
Minutes 15–35
Paired play: levels 1–6
- Work in pairs: a "driver" who moves the blocks and a "navigator" who plans the path. Swap at each new level.
- Encourage pairs to predict what will happen before pressing Run, then check.
- Level 4 introduces the trolley uncle. Ask stuck pairs to watch him for a while before planning.
- Pairs who finish can try for three stars on every level to unlock the secret bonus level.
Minutes 35–42
Class discussion
- What happened when you tried to serve before picking up the tray? Why?
- How did you get past the trolley uncle? Did everyone find the same path?
- Where else do the steps have to be in the right order? (A recipe, brushing your teeth, getting dressed.)
Minutes 42–45
Exit ticket
- Write the three blocks, in order, that would make the robot pick up a tray from the stall above it and serve the table below it.
Early finishers: Draw a hawker centre map on squared paper and write the shortest program to deliver two orders. Swap with a partner and test each other’s programs.
Answer key
One three-star solution per level, in Python. Other solutions with the same number of blocks earn three stars too. Jump links take the class straight to a level.
Level 1: Table for One
4 blocksdotcodecampus.com/maze/hawker/1
move_right() move_right() move_right() serve()
Level 2: Round the Corner
7 blocksdotcodecampus.com/maze/hawker/2
move_right() move_right() move_down() move_down() move_right() move_right() serve()
Level 3: Pick Up First
8 blocksdotcodecampus.com/maze/hawker/3
move_up() pick_up() move_down() move_right() move_right() move_right() move_down() serve()
Level 4: Mind the Trolley
8 blocksdotcodecampus.com/maze/hawker/4
move_down() move_right() move_right() move_right() move_right() move_right() move_up() serve()
Level 5: Two Orders
11 blocksdotcodecampus.com/maze/hawker/5
move_up() pick_up() move_left() move_left() serve() move_right() move_right() pick_up() move_right() move_right() serve()
Level 6: Lunch Rush
21 blocksdotcodecampus.com/maze/hawker/6
move_up() move_up() pick_up() move_down() move_right() move_right() move_down() move_right() serve() move_up() move_left() move_up() move_left() move_left() pick_up() move_down() move_left() move_left() move_down() move_left() serve()
Bonus: Supper Crowd
23 blocksdotcodecampus.com/maze/hawker/bonus
move_up() pick_up() move_down() move_down() serve() move_up() move_up() pick_up() move_left() move_left() move_up() move_left() serve() move_down() move_right() move_right() move_right() pick_up() move_right() move_right() move_up() move_right() serve()