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 mark >= 50 AND mark <= 100 THEN count ← count + 1 | AAdds 1 to count for each entry that falls on a weekend day, because only one of the two tests needs to be true. | |
| 2IF day = "Saturday" OR day = "Sunday" THEN count ← count + 1 | Bcount ← 0 FOR i ← 1 TO 10 IF mark >= 50 AND mark <= 100 THEN count ← count + 1 NEXT i | |
| 3Count only the items that are NOT blank by putting a NOT test inside the loop's IF. | CAdds 1 to count only when the mark is in the range 50 to 100, so both parts of the test must be true. | |
| 4Set the counter to 0 before the loop starts so it begins with nothing counted. | DOR makes the test true for every mark, because any number is at least 50 or at most 100. It should be AND so only marks from 50 to 100 are counted. | |
| 5IF mark >= 50 OR mark <= 100 THEN count ← count + 1 | EIF NOT (item = "") THEN count ← count + 1 | |
| 6FOR i ← 1 TO 10 count ← 0 IF day = "Saturday" OR day = "Sunday" THEN count ← count + 1 NEXT i | Fcount is reset to 0 inside the loop on every pass, so the total is wiped each time. It must be set to 0 once before the loop. |
Complete each line of code by filling in the missing parts.
Shade in the letter of the line that contains an error.
IF mark >= 50 AND mark <= 100 THEN count ← count + 1 — Inside a loop, an IF with AND or OR tests each item and adds 1 to count only when the whole combined condition is true, so count ends as the number of items that qualify.IF mark >= 50 AND mark <= 100 THEN
count ← count + 1
ENDIFIF day = "Saturday" OR day = "Sunday" THEN
count ← count + 1
ENDIFIF NOT (item = "") THEN
count ← count + 1
ENDIFIF mark >= 50 AND mark <= 100 THEN
count ← count + 1
ENDIFIF day = "Saturday" OR day = "Sunday" THEN
count ← count + 1
ENDIF