Tutorpip← About this lessonABCHide the answer keyDownload PDF
Coding · Ages 8+ · Set A
Bo and the birthday cake
Scan to mark
on screen
A
Name
Date
Start Finish
Goal: 15 min
Score/ 11
Remember: Break a long program into small parts, give each part a name and one job, and run and check each part as you build it.

Read and answer

Read the story, then answer.

The birthday programMina and Teo wanted Bo to bring in a birthday cake for Grandpa Joe. Mina snapped on all twenty blocks and pressed Go without checking a single part. One step was mixed up, so Bo set out candles but forgot the cake! Finding one bug in twenty steps took forever, like finding one sock in the laundry. So Teo cut the long strip into four short parts: fetch, carry, decorate and celebrate. Each part had a name and one job. Mina ran part one alone, and it worked. Part two had a bump, but six steps were quick to check and fix. Run a part, check it, add the next, said Mina. Bugs have fewer places to hide!
1
Why was it so hard for Mina to find her bug?
🔎Twenty steps ran at once, so the bug had many places to hide🤖Bo ignored the blocks🔢The program had only four steps
2
Teo cut the long program into four short parts.
TrueFalse
3
Each part had a name and one .
stepbugjob
4
Mina ran part one alone and it worked. What does she do next?
Add all the other parts at onceCheck part one, then add part twoSkip checking because it is probably fine
5
Mina should have pressed Go only once, at the very end, after all twenty blocks.
TrueFalse

Parts, order and fix

6
Bo runs the program in the picture. Which step must come right before switch the room lights off?
switch the candles onplay the birthday songfetch the cake
7
Join each idea to what it does for a long program.
  1. 1a name and one job
  2. 2run each part as you build
  3. 3fix one bug at a time
  4. 4change ten things at once
  • Amakes a bug hard to find
  • Bshows what worked
  • Cshows a bug early
  • Dkeeps each part clear
8
Put Mina and Teo's way of building in order.
  • Add the next part and check it
  • Split the long program into small parts
  • Give each part a name and one job
  • Run part one alone and check it
9
Mina snaps on all twenty blocks and presses Go without checking. What is the mix-up to fix?
She should use fewer colorsBo should carry two cakesShe should run and check each part as she builds it
10
Changing ten things at once makes a bug easy to find.
TrueFalse
11
A long program is just small programs joined end to .
upenddown
12
Pick a long job, like tidying your room. Write the names of four short parts it could be split into.
Scan the code at the top to mark this sheet on screenTake a photo of your answers or type them. It is marked for you automatically, and your score is kept.
Answer key · Set A
Bo and the birthday cake
1Twenty steps ran at once, so the bug had many places to hide She never ran the parts one at a time, so one mixed-up step was hidden among twenty.
2True The parts were fetch, carry, decorate and celebrate.
3job A name and one job for each part keeps a long program clear.
4Check part one, then add part two Her rule is run a part, check it, add the next. Bugs have fewer places to hide.
5False Running only at the end hides bugs among many steps. Run each part as you build it.
6switch the candles on The candles must glow before the room goes dark, so switch the candles on comes just before the lights go off.
71-D, 2-C, 3-B, 4-A Names keep parts clear, running early shows bugs, one fix at a time shows what worked, and ten changes at once hide the cause.
84, 1, 2, 3 First the program is split and named, and then each part is run and checked before the next is added.
9She should run and check each part as she builds it Checking each part as you build it shows a bug early, when it is easy to find.
10False With ten changes you cannot tell which one helped. Change one thing at a time.
11end Teo said a long program is just small programs joined end to end.
12Your own words: a grown-up reads it.
Mark each answer, count the right ones and write the score on the sheet.