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 Show(Name : STRING, Age : INTEGER) | APROCEDURE Report(Name : STRING, Age : INTEGER, Score : REAL) | |
| 2CALL Show("Sam", 14) | BThe comma between the parameters is missing. It should be PROCEDURE Show(Name : STRING, Age : INTEGER). | |
| 3A procedure can have three parameters, each with its own data type, separated by commas | CCalls the procedure with two values: "Sam" goes to Name and 14 goes to Age, matched by position | |
| 4The call must give one value for each parameter in the same order as the header, so the first value is a STRING and the second is an INTEGER | DThe values are in the wrong order. 14 is passed to Name (a STRING) and "Sam" to Age (an INTEGER), so the types do not match. It should be CALL Show("Sam", 14). | |
| 5CALL Show(14, "Sam") | EDefines a procedure with two parameters separated by a comma, each with its own data type | |
| 6PROCEDURE Show(Name : STRING Age : INTEGER) | FCALL Show("Mia", 15) |
Complete each line of code by filling in the missing parts.
Shade in the letter of the line that contains an error.
PROCEDURE Show(Name : STRING, Age : INTEGER) — Several parameters are separated by commas, each with its own data type. A call gives one value for each, in the same order, such as CALL Show("Sam", 14).PROCEDURE Show(Name : STRING, Age : INTEGER)PROCEDURE Show(Name : STRING, Age : INTEGER)PROCEDURE Show(Name : STRING, Age : INTEGER)
CALL Show("Sam", 14)PROCEDURE Box(W : REAL, H : REAL, D : REAL)PROCEDURE Show(Name : STRING, Age : INTEGER)
Years ← 14
CALL Show("Sam", Years)