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 >= 13 AND Age <= 19 | AThe second condition is incomplete. Each side of AND must be a full condition, so Age is missing before <= 19. | |
| 2Score > 50 AND Score < 80 AND Passed = TRUE | BOR is used instead of AND. With OR almost every age is TRUE, so it does not check the 13 to 19 range. | |
| 3Check that a mark is in the range 0 to 100 using AND | CTRUE only when the age is from 13 to 19 inclusive, because both conditions must be TRUE | |
| 4If either condition is FALSE, the whole AND condition is FALSE | DIF 15 > 10 AND 4 > 9 THEN | |
| 5IF Age >= 13 AND <= 19 THEN | EA three-part AND that is TRUE only when all three conditions are TRUE | |
| 6IF Age >= 13 OR Age <= 19 THEN | FIF Mark >= 0 AND Mark <= 100 THEN |
Complete each line of code by filling in the missing parts.
Shade in the letter of the line that contains an error.
AND — AND joins two conditions and is TRUE only when both are TRUE, e.g. Age >= 13 AND Age <= 19. If either condition is FALSE, the whole condition is FALSE.IF Age >= 13 AND Age <= 19 THEN
OUTPUT "Teenager"
ENDIFIF Age >= 13 AND Age <= 19 THEN
OUTPUT "Teenager"
ENDIFIF Score >= 0 AND Score <= 100 THEN
OUTPUT "Valid mark"
ENDIFIF Age >= 13 AND Age <= 19 THEN
OUTPUT "Teenager"
ENDIFIF Num > 0 AND Num < 10 AND Num <> 5 THEN
OUTPUT "OK"
ENDIF