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 | |
|---|---|---|
| 1define addNumbers(a: INTEGER, b: INTEGER): INTEGER | AThe header is missing the colon before the return type | |
| 2: BOOLEAN | BA function header with two integer parameters and an integer return type | |
| 3The data type describing a parameter or return value in a function header | Cdefine greet(name: STRING): STRING | |
| 4A colon used just before the return type in a function header | DIndicates the function returns a TRUE or FALSE value | |
| 5define greet(name: STRING) STRING return "Hello " + name end function | EThe parameter num is missing its data type | |
| 6define square(num): REAL return num * num end function | FINTEGER |
Complete each line of code by filling in the missing parts.
Shade in the letter of the line that contains an error.
addNumbers(a: INTEGER, b: INTEGER): INTEGER — A function header specifying the function's name, its typed parameters, and the data type of its return valuedefine addNumbers(a: INTEGER, b: INTEGER): INTEGERdefine addNumbers(a: INTEGER, b: INTEGER): INTEGERdefine greet(name: STRING): STRINGdefine isEven(num: INTEGER): BOOLEANdefine square(num: REAL): REAL