Find and fix bugs
Answers are for parents and teachers.
1
Write the four steps of debugging in the right order, and say in one sentence why the last step matters.
Run the program and watch; spot the line where the program and the algorithm stop matching; fix that line; run it again to check. The last step shows that the fix worked and did not make a new bug.
2
The algorithm says: when this sprite is clicked, start sound Pop, then say “Yum!” for 1 second. Look at the program and find the bug.
The start sound block is missing, so there is no pop. Add start sound [Pop v] before the say block.
3
Plan a game with a butterfly and a flower. Write a table with three columns: sprite, starts when, what it does. Give each sprite two rows.
Answers vary. Check that each row has a start event (green flag, key or click) and a clear action, with numbers for moves.
4
A boat starts at x: −200 and moves 25 steps for each key press. Fill a table for 0, 1, 2, 3 and 4 presses.
0: −200; 1: −175; 2: −150; 3: −125; 4: −100.
5
(if you have a computer or tablet) Build the boat race from lesson 3 in Scratch with two boats. Test it and check that both boats are fair.
Each boat starts at x: −200, with y: 50 and −50. Each key press changes x by 30, and 13 presses reach x: 190.