Tip: Choose Save as PDF in the print dialog to download. Use A4 paper size.
Shade in the A or B circle for each question.
Draw a line connecting each item on the left to its match on the right.
| Left column | Right column | |
|---|---|---|
| 1SET score TO 0 | AThe variable name and value are swapped. The name score should come after SET and the value 0 after TO: SET score TO 0. | |
| 2ADD 1 TO score | BThe steps are in the wrong order. The variable is changed before it has a starting value, so the counter would be reset to 0 and the count lost. SET should come first. | |
| 3A counter variable starts at zero before counting begins | CSET lives TO 3 ADD 1 TO lives | |
| 4A variable can store a value that changes later in the algorithm | DSET lapCount TO 0 | |
| 5ADD 1 TO score SET score TO 0 | EMakes a variable called score and gives it the starting value 0 | |
| 6SET 0 TO score | FChanges the variable score by making its stored value one bigger |
Complete each line of code by filling in the missing parts.
Shade in the letter of the line that contains an error.
SET score TO 0 — A variable is a named place that stores a value. SET gives it a value, like 0, and later steps can change it, such as ADD 1 to score, so it works as a counter.SET score TO 0SET score TO 0SET score TO 0SET score TO 0
ADD 1 TO score
SHOW scoreSET count TO 0
REPEAT 3 TIMES
ADD 1 TO count