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 Score > 50 THEN | ANEXT is a keyword, so it cannot be used as an identifier name. Use a name such as NextNumber. | |
| 2FOR Count ← 1 TO 10 | BFOR Count ← 1 TO 5 OUTPUT Count NEXT Count | |
| 3An IF statement must be closed with its keyword ENDIF in capital letters | CIF and THEN are keywords, so they are written in capital letters | |
| 4A FOR loop is closed with the keyword NEXT in capital letters | DIF Age >= 16 THEN OUTPUT "Allowed" ENDIF | |
| 5if Score > 50 then | EFOR and TO are keywords in capitals, and the loop is closed later by NEXT | |
| 6DECLARE NEXT : INTEGER | FThe keywords if and then are in lower case. They must be IF and THEN. |
Complete each line of code by filling in the missing parts.
Shade in the letter of the line that contains an error.
IF — A Cambridge pseudocode keyword. All keywords, such as IF, THEN, FOR, NEXT and OUTPUT, are written in capital letters, and they cannot be used as identifier names.IF Score >= 50 THEN
OUTPUT "Pass"
ENDIFFOR Count ← 1 TO 5
OUTPUT Count
NEXT CountIF Age >= 16 THEN
OUTPUT "Allowed"
ENDIFFOR Index ← 1 TO 10
OUTPUT Index * 2
NEXT IndexINPUT Guess
IF Guess = 7 THEN
OUTPUT "Correct"