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 Line(Size : INTEGER) | AThe identifier and data type are the wrong way round. The identifier comes first, then the colon, then the type: Size : INTEGER. | |
| 2PROCEDURE ShowName(Name : STRING) | BThe colon is missing between the parameter name and its data type. It should be Size : INTEGER. | |
| 3A parameter is used inside the procedure body like a variable, for example to output its value | CPROCEDURE ShowPrice(Price : REAL) OUTPUT Price ENDPROCEDURE | |
| 4A procedure with a REAL parameter ends with ENDPROCEDURE after its body | DOUTPUT Size | |
| 5PROCEDURE Line(Size INTEGER) | EStarts a procedure called Line with one parameter, Size, which must hold a whole number | |
| 6PROCEDURE Line(INTEGER : Size) | FStarts a procedure with one parameter, Name, that holds text |
Complete each line of code by filling in the missing parts.
Shade in the letter of the line that contains an error.
PROCEDURE Line(Size : INTEGER) — Defines a procedure with one parameter. In the brackets after the name, write the parameter identifier, a colon, then its data type. Size is used inside the body.PROCEDURE Line(Size : INTEGER)
OUTPUT Size
ENDPROCEDUREPROCEDURE Greet(Name : STRING)
OUTPUT "Hello ", Name
ENDPROCEDUREPROCEDURE ShowPrice(Cost : REAL)
OUTPUT Cost
ENDPROCEDUREPROCEDURE Line(Size : INTEGER)
OUTPUT Size
ENDPROCEDUREPROCEDURE Greet(Name : STRING)
OUTPUT Name
ENDPROCEDURE