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 count TO 0 REPEAT 5 TIMES IF page is torn THEN ADD 1 TO count | AA school routine that checks 5 library books and counts how many pages are torn | |
| 2SET lives TO 3 REPEAT UNTIL lives = 0 IF hit THEN TAKE 1 FROM lives | BA game that keeps going until the player has lost all 3 lives | |
| 3A recipe algorithm that adds eggs one at a time, counts them and stops at 3 | Ccount = 0, round 1: IF true THEN count = 1, round 2: IF false THEN count stays 1 | |
| 4Checking your algorithm by following it step by step with a small starting value | DThe counter was never set to 0 before the loop, so we do not know what number it starts from. | |
| 5REPEAT 10 TIMES IF homework done THEN ADD 1 TO count | EIf the answer is wrong, score never changes, so the loop could never stop. The counter must go up each round, or the loop needs a way to end. | |
| 6SET score TO 0 REPEAT UNTIL score = 10 IF answer correct THEN ADD 1 TO score | FSET eggs TO 0 REPEAT UNTIL eggs = 3 ADD 1 egg ADD 1 TO eggs |
Complete each line of code by filling in the missing parts.
Shade in the letter of the line that contains an error.
REPEAT + IF + count — A finished algorithm joins steps, a decision (IF), a loop (REPEAT) and a counter to solve a school, game or recipe problem. You check it by following it step by step.SET count ← 0
REPEAT 5 TIMES
IF bag has book THEN ADD 1 to countSET lives ← 3
REPEAT UNTIL lives = 0
IF hit THEN SET lives ← lives - 1SET eggs ← 0
REPEAT 3 TIMES
IF egg is fresh THEN ADD 1 to eggsSET stirs ← 0
REPEAT UNTIL stirs = 10
SET stirs ← stirs + 1SET count ← 0
REPEAT 3 TIMES ADD 1 TO count
SAY count