Tutorpip← About this lessonABCWith the answer keyDownload PDF
Coding · Ages 8+ · Set A
Maya's seven cards
Scan to mark
on screen
A
Name
Date
Start Finish
Goal: 15 min
Score/ 11
Remember: A bug is a mix-up in the steps. Run the program one step at a time, find the step that goes off, check the cards before the bump too, fix that one step, and run it again.

Read and answer

Read the story, then answer.

Bonk!The robot show is tomorrow, and Maya and Jonah want Bo to walk across the map and stop on the star. Maya lays out seven cards: forward, forward, forward, turn left, forward, forward, forward. She taps Run. Bo walks three steps along the bottom and turns to face the top. On the next forward, Bonk! He bumps into the rock. Jonah says they could start again from nothing, but Ms. Park has a better trick: run the program one step at a time. Steps one, two and three are fine. Step four turns Bo to face the top, and the rock is right in front of him. The bump came at card five, but the mix-up was one card earlier. Maya slides the turn card one place later, and Bo stops right on the star.
1
Bo runs Maya's seven cards on the map. Bo bumps into the rock. On which card does the bump happen?
Card 4, the turnCard 5, the next forwardCard 7, the last one
2
Bo bumped because the robot is broken, so Maya needs a new robot.
TrueFalse
3
The bump showed at card five, but the mix-up was one card .
laterearliermissing
4
Ms. Park has a trick for finding the step that goes off. What is it?
Start again from nothingChange every card at onceRun the program one step at a time
5
Maya slides the turn card one place later. Where does Bo stop now?
On the starOn the rockBack at the start
6
If Bo bumps on card five, the mix-up must be on card five.
TrueFalse

Find the bug

7
Starting again from nothing throws away cards that already work.
TrueFalse
8
Join each debugging step to why it helps.
  1. 1run one step at a time
  2. 2check the cards before the bump
  3. 3change just one step
  4. 4run it once more
  • Athe mistake can come earlier
  • Bshows which change helped
  • Cshows where Bo goes off
  • Dshows whether the fix worked
9
Put Maya's debugging in order.
  • Change just that one step
  • Find the step that goes off
  • Run the program and see Bo bump
  • Run it again
  • Run it one step at a time
10
On map B, Bo starts facing up and bumps on card 5. Mix-up to fix: which change gets Bo to the star?
Delete card 5Add one forward between cards 3 and 4Swap cards 1 and 2
11
Stretch: this program for map B does not bump, but Bo stops one square below the star. Which card fixes it?
Add a turn right at the endTake away the last forwardAdd one forward at the end
12
Ask a grown-up for three steps to walk to the door. Write the steps, then write which one went off and how you fixed it.
13
Draw Bo's fixed way from the start to the star on Maya's map.
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.