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 OUTPUT "Pass" ENDIF | AWHILE is a keyword, so it cannot be used as an identifier. Use a name such as Counter instead. | |
| 2WHILE Count < 5 DO Count ← Count + 1 ENDWHILE | BIF Age >= 16 THEN OUTPUT "Adult" ENDIF | |
| 3Every keyword in Cambridge pseudocode, including the one that closes a selection, is written in upper case | CDECLARE Total : INTEGER | |
| 4A keyword can never be used as an identifier name, so a variable must have a different name such as Total | DCorrect: WHILE, DO and ENDWHILE are keywords in upper case, while Count is an identifier in Pascal case | |
| 5if Score >= 50 THEN OUTPUT "Pass" endif | ECorrect: the keywords IF, THEN, OUTPUT and ENDIF are all written in upper case | |
| 6DECLARE WHILE : INTEGER | FThe keywords if and endif are in lower case. They should be IF and ENDIF. |
Complete each line of code by filling in the missing parts.
Shade in the letter of the line that contains an error.
IF — IF is a pseudocode keyword. All keywords (IF, ENDIF, WHILE, OUTPUT) are written in upper case and never used as identifier names. Lower case, such as if, is a presentation error.IF Mark >= 50 THEN
OUTPUT "Pass"
ENDIFIF Mark >= 50 THEN
OUTPUT "Pass"
ENDIFWHILE Count <= 5 DO
Count ← Count + 1
ENDWHILEWHILE Count <= 5 DO
Count ← Count + 1
ENDWHILEIF Age >= 18 THEN
OUTPUT "Adult"
ENDIF