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 | |
|---|---|---|
| 1PROCEDURE ShowMenu() OUTPUT "1. Play" ENDPROCEDURE | ADefines a procedure called ShowMenu with no parameters. Its block of code does not run yet. | |
| 2CALL ShowMenu() | BRuns the procedure called ShowMenu from the main program. | |
| 3A procedure with no parameters is defined with empty brackets after its name and closed with ENDPROCEDURE. | CPROCEDURE GetScores() INPUT Score ENDPROCEDURE | |
| 4A main program uses CALL once for each sub-problem box of the structure diagram, each box being a procedure. | DCALL is missing, so this does not correctly run the procedure. It should be CALL ShowMenu(). | |
| 5PROCEDURE ShowMenu() OUTPUT "1. Play" ENDFUNCTION | EThe procedure is closed with ENDFUNCTION. A procedure must end with ENDPROCEDURE. | |
| 6ShowMenu() | FCALL GetScores() CALL CalcAverage() CALL ShowResult() |
Complete each line of code by filling in the missing parts.
Shade in the letter of the line that contains an error.
PROCEDURE Name() ... ENDPROCEDURE — Defines a named block of pseudocode for one sub-problem. It does not return a value. The block only runs when you write CALL Name() in the main program.PROCEDURE ShowMenu()
OUTPUT "1. Play"
ENDPROCEDUREPROCEDURE ShowMenu()
OUTPUT "1. Play"
ENDPROCEDUREOUTPUT "Start"
CALL ShowMenu()
OUTPUT "End"CALL ShowMenu()
INPUT Choice
CALL ShowMenu()PROCEDURE GetAge()
INPUT Age
ENDPROCEDURE