Slide 1 of 7 · Settling starter · PSE / Well-being · Year 5
5 minutesDebugging a Healthy Morning Routine
Cai is in Year 5 and lives in Cardigan. He keeps missing the school bus. He wrote an algorithm for his school morning, but it has bugs.
While the register is called: write your name, class and date on your worksheet. Then read Cai’s algorithm in section 2 of the stimulus sheet.
Starter question: Step 7 says “Brush teeth for 2 seconds.” What does the NHS say in section 4? What has gone wrong?
Slide 2 of 7 · Today’s brief and key words · PSE / Well-being · Year 5
3 minutesYour brief: fix the algorithm so Cai catches the 08:10 bus
You will predict, 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.
Algorithm
A set of instructions in the right order to do a job.
Debug
Find and fix the mistakes (bugs) in an algorithm.
Loop
An instruction to repeat steps, for example Repeat 3 times: clap your hands. A loop makes an algorithm shorter.
Slide 3 of 7 · Steps 1 and 2: predict and find the bugs · PSE / Well-being · Year 5
15 minutesStep 1: predict · Step 2: find the 4 bugs
Step 1: before you calculate anything, will Cai catch the 08:10 bus? Why do you think that?
Step 2: there are 4 bugs. One is not wrong exactly, but it makes the algorithm longer than it needs to be.
| Step | What is wrong? | How to fix it |
|---|---|---|
| 2 | He puts his shoes on before he gets dressed and puts his socks on. | Move “Put on shoes and coat” to after packing his bag, just before he walks to the stop. |
Slide 4 of 7 · Step 3: write the debugged algorithm · PSE / Well-being · Year 5
8 minutesStep 3: 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.
Model start: 1. START: the alarm rings at 07:00. Get out of bed. 2. Go to the toilet, then wash hands and face. 3. Get dressed in school uniform and socks. 4. Watch videos on the tablet for 30 minutes.
The loop: Repeat 4 times: put a book in the bag.
Slide 5 of 7 · Steps 4 and 5: timetable and change the plan · PSE / Well-being · Year 5
20 minutesStep 4: make the timetable · Step 5: change the algorithm
Step 4: use the timing card. Each job starts when the one before it finishes. Then find the total and the time Cai reaches the stop.
| Job | Minutes | Start | Finish |
|---|---|---|---|
| Toilet, then wash hands and face | 5 | 07:00 | 07:05 |
| Get dressed | 10 | 07:05 | 07:15 |
Step 5: Cai wants to reach the stop by 08:05. Plan A: shorter videos. Plan B: earlier alarm. Then one change for his well-being.
Slide 6 of 7 · Self and partner check · PSE / Well-being · Year 5
3 minutesCheck your work against the success criteria
Swap worksheets with a partner or check your own. Tick each point in the box on your sheet once you can prove it is there.
- I can find bugs in an algorithm and explain how to fix them.
- I can use a loop to make repeated steps shorter.
- I can make a timetable by adding minutes to times, and find how early or late something is.
- I can change an algorithm to get a different outcome, and check it with times.
Slide 7 of 7 · Plenary review · PSE / Well-being · Year 5
3 minutesQuick-check answers before handing in
Check your main answers before your worksheets are collected.
| Question | Correct answer |
|---|---|
| How long does the debugged routine take? | 79 minutes, which is 1 hour 19 minutes. |
| When does Cai reach the bus stop, and does he catch the 08:10 bus? | 08:19. He misses it by 9 minutes. |
| Plan A and Plan B to arrive by 08:05? | Videos cut to 16 minutes, or the alarm at 06:46. |