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 | |
|---|---|---|
| 1NOT (Score >= 50) | ATRUE when the BOOLEAN variable Found holds FALSE | |
| 2NOT Found | BIF NOT Found THEN OUTPUT "Not found" ENDIF | |
| 3NOT reverses a condition, so NOT FALSE gives TRUE | CTRUE only when Score is below 50, because NOT reverses the condition | |
| 4NOT (Age = 18) does the same job as the not-equal operator <> | DNOT (Score >= 50) is TRUE for scores below 50, so the message should be Fail, not Pass. | |
| 5IF NOT Score >= 50 THEN OUTPUT "Fail" ENDIF | EIF Age <> 18 THEN OUTPUT "Not 18" ENDIF | |
| 6IF NOT (Score >= 50) THEN OUTPUT "Pass" ENDIF | FThe condition Score >= 50 is not in brackets, so it is unclear what NOT applies to. It should be NOT (Score >= 50). |
Complete each line of code by filling in the missing parts.
Shade in the letter of the line that contains an error.
NOT — A logical operator that reverses a condition: NOT TRUE is FALSE and NOT FALSE is TRUE. For example, NOT (Score >= 50) is TRUE only when Score is below 50.IF NOT (Score >= 50) THEN
OUTPUT "Resit needed"
ENDIFIF NOT Found THEN
OUTPUT "Keep searching"
ENDIFSame ← NOT (Age = 18)
Same2 ← Age <> 18Pass ← NOT (Score < 50)
OUTPUT PassResult ← NOT FALSE
OUTPUT Result