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 | |
|---|---|---|
| 1FOR Count ← 1 TO 5 | AFOR Count ← 2 TO 10 STEP 2 | |
| 2NEXT Count | BNEXT does not name the loop variable. It should be NEXT Count. | |
| 3A FOR loop with STEP 2 jumps by 2 each time, so Count takes the values 2, 4, 6, 8, 10 | CStarts a loop where Count is 1, 2, 3, 4, 5, so the lines inside repeat 5 times | |
| 4A complete FOR loop that outputs the numbers 1 to 3 using the loop variable | DFOR Count ← 1 TO 3 OUTPUT Count NEXT Count | |
| 5FOR Count ← 1 TO 5 OUTPUT Count NEXT | EMarks the end of the FOR loop and names the loop variable that is increased by 1 | |
| 6FOR Count ← 1 TO 5 OUTPUT Count Count ← Count + 1 NEXT Count | FCount is increased inside the loop by hand. A FOR loop changes the loop variable automatically, so this line is wrong and should be removed. |
Complete each line of code by filling in the missing parts.
Shade in the letter of the line that contains an error.
FOR Count ← 1 TO 10 — Repeats the lines up to NEXT Count a fixed number of times. Count starts at 1, goes up automatically, and both the start and end values are included. STEP changes the jump.FOR Count ← 1 TO 5
OUTPUT Count
NEXT CountFOR Count ← 1 TO 10
OUTPUT Count * 2
NEXT CountFOR Total ← 1 TO 8
OUTPUT Total
NEXT TotalFOR Count ← 0 TO 10 STEP 2
OUTPUT Count
NEXT CountFOR Count ← 10 TO 1 STEP -1
OUTPUT Count
NEXT Count