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 | |
|---|---|---|
| 1OTHERWISE OUTPUT "Beep" | ACASE Choice OF 1 : OUTPUT "Start" OTHERWISE OUTPUT "Beep" ENDCASE | |
| 2CASE Choice OF 1 : OUTPUT "Start" 2 : OUTPUT "Stop" ENDCASE | BOTHERWISE OUTPUT "Invalid choice" | |
| 3OTHERWISE must be the last clause in the CASE statement, just before ENDCASE | CThere is no OTHERWISE, so no "Beep" is output when Choice is not 1 or 2. The CASE does nothing. | |
| 4OTHERWISE catches every value that is not one of the listed cases, such as an invalid menu choice | DA CASE with no OTHERWISE: if Choice is 3, nothing happens | |
| 5CASE Choice OF OTHERWISE OUTPUT "Beep" 1 : OUTPUT "Start" ENDCASE | EIf the value matches none of the listed cases, output Beep | |
| 6CASE Choice OF 1 : OUTPUT "Start" 2 : OUTPUT "Stop" ENDCASE // expects "Beep" for other values | FOTHERWISE is placed first. It must be the last clause, after all the listed cases. |
Complete each line of code by filling in the missing parts.
Shade in the letter of the line that contains an error.
OTHERWISE — The last clause in a CASE statement. It runs when the value matches none of the listed cases, e.g. OTHERWISE OUTPUT "Beep". Without it, nothing happens if there is no match. "Y" : OUTPUT "Yes"
OTHERWISE OUTPUT "Beep"
ENDCASE 2 : OUTPUT "Stop"
OTHERWISE OUTPUT "Beep"
ENDCASE 1 : OUTPUT "Go"
OTHERWISE OUTPUT "Beep"
ENDCASECASE OF Key
1 : OUTPUT "Go"
OTHERWISE OUTPUT "Beep" "N" : OUTPUT "North"
OTHERWISE OUTPUT "Beep"
ENDCASE