Cover lesson · Health and Well-being · Year 5 · Intermediate

Debugging a healthy morning routine

DCF: Data and computational thinking → Problem-solving and modelling

Also assessed, LNF: Numeracy → Learning about geometry helps us understand shape, space and position, and learning about measurement helps us quantify in the real world → Measurement

Name: Class: Date:

Cover teacher: you need no subject knowledge

What this practises: debugging an algorithm (finding and fixing mistakes in a set of instructions), using a loop to shorten repeated steps, and changing instructions to get a different outcome, all through a healthy school morning routine. Pupils turn the fixed algorithm into a timetable of start and finish times and work out how late Cai is, so Steps 4 and 5 are real numeracy evidence of time calculations.

Print: this sheet, one per pupil, and the stimulus sheet “Cai’s school morning algorithm”, one between two. No computers are needed.

Run: 5 min read the stimulus sheet aloud · 6 min Step 1 · 12 min Step 2 · 8 min Step 3 · 14 min Step 4 · 12 min Step 5. Total 57 minutes.

Collect: this sheet. Steps 4 and 5 are the numeracy evidence (a timetable of start and finish times, the total in minutes and in hours and minutes, and new times worked out for a changed plan). Steps 1, 2, 3 and 5 are the digital competence evidence. Quick checks: 4 bugs (shoes before dressing, teeth for 2 seconds, walking before packing, 4 repeated steps that should be a loop); the fixed routine takes 79 minutes = 1 hour 19 minutes, Cai reaches the stop at 08:19, 9 minutes after the bus has gone.

What you are doing

Cai keeps missing the school bus. He wrote an algorithm for his school morning, but it has bugs. You will find and fix the bugs, use a loop, turn the algorithm into a timetable, and then change it so Cai catches the bus and has a healthier start to the day.

Step 1: predict

Read Cai’s algorithm and the timing card on the stimulus sheet. Before you calculate anything, predict: will Cai catch the 08:10 bus? Why do you think that?

Step 2: find the bugs

There are 4 bugs. One bug is not wrong exactly, but it makes the algorithm longer than it needs to be.

Step numberWhat is wrong?How to fix it

Step 3: write the debugged algorithm

Write Cai’s algorithm again with every bug fixed. Keep the 30 minutes of videos for now. Use a loop for the books. Start with START and finish with END.

Step 4: turn it into a timetable

Use the timing card. The first row is done for you. Each job starts when the one before it finishes.

Job (in your debugged order)MinutesStartFinish
Toilet, then wash hands and face507:0007:05

(a) How many minutes does the whole routine take? Write it in hours and minutes too.

(b) What time does Cai reach the bus stop? Does he catch the 08:10 bus? How many minutes early or late is he? Was your prediction in Step 1 right?

Step 5: change the algorithm

Cai wants to reach the bus stop by 08:05, so he has 5 minutes to spare.

(a) Plan A: keep everything the same but change how long he watches videos. What is the longest the videos can last? Show your working.

(b) Plan B: keep the 30 minutes of videos but change the time his alarm rings. What time should the alarm ring? Show your working.

(c) Write one more change to Cai’s algorithm that would help his well-being, not just his timing. Explain why it helps.

Step by step

  1. 5 min Read the stimulus sheet with your teacher.
  2. 6 min Step 1: predict whether Cai catches the bus.
  3. 12 min Step 2: find and explain the 4 bugs.
  4. 8 min Step 3: write the debugged algorithm with a loop.
  5. 14 min Step 4: make the timetable and find when Cai arrives.
  6. 12 min Step 5: change the algorithm so he catches the bus.

Success criteria

If you finish early