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 | |
|---|---|---|
| 1IF card = red THEN count ← count + 1 | AAdds 1 to the score only when the quiz answer is correct, and leaves the score alone if it is wrong | |
| 2IF answer = correct THEN score ← score + 1 | BThe count goes up on every turn of the loop, not only for red cards. The add-1 step must come after THEN so it only happens when the card is red. | |
| 3When a card is black, the condition is false, so the counter stays the same | CAdds 1 to the counter only when the card being checked is red | |
| 4Start the counter at 0, then check every card in the pile and count only the red ones | DIF card = red THEN count ← count + 1 | |
| 5REPEAT 10 TIMES count ← count + 1 IF card = red THEN say count | EThe counter is reset to 0 instead of adding 1. It should be count ← count + 1 so the red cards are added up. | |
| 6count ← 0 REPEAT 10 TIMES IF card = red THEN count ← 0 | Fcount ← 0 REPEAT 10 TIMES IF card = red THEN count ← count + 1 |
Complete each line of code by filling in the missing parts.
Shade in the letter of the line that contains an error.
IF card = red THEN count ← count + 1 — Inside a loop, the IF checks each item. Only when the item meets the condition does the counter go up by 1. If the condition is false, the counter stays the same.FOR EACH card IN pile
IF card = red THEN
count ← count + 1REPEAT 10 TIMES
IF answer = right THEN
score ← score + 1FOR EACH card IN pile
IF card = red THEN
count ← count + 1count ← 0
FOR EACH card IN pile
IF card = red THEN count ← count + 1score ← 0
FOR EACH answer IN quiz
IF answer = right THEN score ← score + 1