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 | AStarts a selection that runs the indented lines below only when Score is 50 or more | |
| 2ENDIF | BIF Score >= 50 THEN Passed <- Passed + 1 OUTPUT "Pass" ENDIF | |
| 3When the condition is FALSE, the statements in the THEN branch are skipped and the program carries on after ENDIF | CIF Age >= 18 THEN OUTPUT "Adult" ENDIF OUTPUT "Done" | |
| 4The THEN branch can hold more than one indented statement, and all of them run only when the condition is TRUE | DCloses the IF statement and lines up directly under the IF it belongs to | |
| 5IF Score >= 50 THEN OUTPUT "Pass" | ETHEN is missing after the condition | |
| 6IF Score >= 50 OUTPUT "Pass" ENDIF | FThe ENDIF is missing, so the IF statement is never closed |
Complete each line of code by filling in the missing parts.
Shade in the letter of the line that contains an error.
IF condition THEN ... ENDIF — Runs the indented statements only when the condition is TRUE. If it is FALSE they are skipped. ENDIF closes the selection and lines up with IF.IF Score >= 50 THEN
OUTPUT "Pass"
ENDIFIF Score >= 50 THEN
OUTPUT "Pass"
ENDIFIF Score >= 50 THEN
OUTPUT "Pass"
ENDIFIF Score >= 50 THEN
OUTPUT "Pass"
ENDIFIF Score >= 50 THEN
OUTPUT "Well done"
ENDIF