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 | |
|---|---|---|
| 1CASE OF Choice | AStarts a CASE statement that compares the variable Choice with a list of values | |
| 2ENDCASE | BCloses the CASE statement after the last value has been listed | |
| 3Each value is written with a colon, then the statement that runs when the variable matches that value | CCASE OF Grade 'A' : OUTPUT "Top" 'B' : OUTPUT "Good" ENDCASE | |
| 4A CASE statement can test a CHAR variable, with each CHAR value written one per line | D1 : OUTPUT "Start" | |
| 5CASE OF Choice 1 : OUTPUT "Start" 2 : OUTPUT "Quit" | EENDCASE is missing, so the CASE statement is never closed. Add ENDCASE after the last value. | |
| 6CASE OF Choice 1 OUTPUT "Start" 2 OUTPUT "Quit" ENDCASE | FThe colon is missing between each value and its statement. It should be 1 : OUTPUT "Start". |
Complete each line of code by filling in the missing parts.
Shade in the letter of the line that contains an error.
CASE OF Choice — Compares one variable (here Choice) with a list of values, runs the statement beside the matching value, and is closed by ENDCASE.CASE OF Choice
1 : OUTPUT "Start"
ENDCASECASE OF Choice
1 : OUTPUT "Start"
ENDCASECASE OF Choice
2 : OUTPUT "Quit"
ENDCASECASE OF Grade
'A' : OUTPUT "Top mark"
ENDCASECASE OF Choice
2 : OUTPUT "Quit"
ENDCASE