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 | |
|---|---|---|
| 1Age <> 18 | AIF Password = "abc123" THEN | |
| 2Score >= 50 | B← assigns a value and cannot compare. Use = in the condition: IF Age = 18 THEN. | |
| 3Use = to compare two values and get TRUE or FALSE, not to store a value | CTRUE when Score is 50 or more, FALSE when Score is below 50 | |
| 4Use ← to assign a value to a variable, while = only compares values | DTRUE when Age is not equal to 18, FALSE when Age is exactly 18 | |
| 5IF Mark != 40 THEN | E!= is not Cambridge pseudocode. Not equal is written <>, so it should be IF Mark <> 40 THEN. | |
| 6IF Age ← 18 THEN | FTotal ← 0 |
Complete each line of code by filling in the missing parts.
Shade in the letter of the line that contains an error.
= < <= > >= <> — Relational operators compare two values and give TRUE or FALSE: = equal, < less, <= at most, > greater, >= at least, <> not equal. Use = to compare, ← to assign.IF Age >= 18 THEN
OUTPUT "Adult"
ENDIFIF Password <> "abc123" THEN
OUTPUT "Wrong password"
ENDIFIF Choice = 1 THEN
OUTPUT "You chose option 1"
ENDIFIsTeen ← Age <= 19
OUTPUT IsTeenTotal ← 0
IF Total = 0 THEN
OUTPUT "Empty"
ENDIF