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 | |
|---|---|---|
| 1CALL GetInputs | ARuns the procedure that handles the input sub-problem, so the main program holds no input detail | |
| 2CALL ShowResults | BThe calls are in the wrong order. The results are shown before they are calculated and before the inputs are entered. | |
| 3A main program is a short list of CALL statements, one per sub-problem, with no detail inside it | CRuns the output sub-problem as the last step of the main program, after the calculation is done | |
| 4The order of the calls matters: inputs must be collected before they are used in a calculation | DThe main program contains detail (INPUT Length) instead of only CALL statements. The detail belongs inside the GetInputs procedure. | |
| 5CALL ShowResults CALL Calculate CALL GetInputs | ECALL GetInputs CALL Calculate | |
| 6CALL GetInputs INPUT Length CALL Calculate CALL ShowResults | FCALL GetInputs CALL Calculate CALL ShowResults |
Complete each line of code by filling in the missing parts.
Shade in the letter of the line that contains an error.
CALL — Runs a procedure. A main program is a short list of CALL lines, one per sub-problem from the structure diagram, in the right order, with no detail inside it.CALL GetInputs
CALL Calculate
CALL ShowResultsCALL GetInputs
CALL Calculate
CALL ShowResultsCALL GetInputs
CALL Calculate
CALL ShowResultsCALL GetInputs
CALL Calculate
CALL ShowResultsCALL GetInputs
CALL Calculate
CALL ShowResults