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 | |
|---|---|---|
| 1FUNCTION GetPi RETURNS REAL | AFUNCTION GetPi RETURNS REAL RETURN 3.14 ENDFUNCTION | |
| 2ENDFUNCTION | BCloses the function definition after its statements | |
| 3A function with no parameters has no brackets after its name, then RETURNS and the data type | CFUNCTION GetPi RETURNS REAL | |
| 4A complete function with no parameters returns a value before ENDFUNCTION | DStarts a function with no parameters that sends back a REAL value | |
| 5FUNCTION GetPi() RETURNS REAL | EEmpty brackets were added after the name. A function with no parameters is written without brackets, so it should be FUNCTION GetPi RETURNS REAL. | |
| 6FUNCTION GetPi RETURN 3.14 ENDFUNCTION | FThe RETURNS keyword and data type are missing from the header. It should be FUNCTION GetPi RETURNS REAL. |
Complete each line of code by filling in the missing parts.
Shade in the letter of the line that contains an error.
FUNCTION GetPi RETURNS REAL — Starts a function with no parameters: the name has no brackets, RETURNS gives the data type of the value sent back, and ENDFUNCTION closes the function.FUNCTION GetPi RETURNS REAL
RETURN 3.14159
ENDFUNCTIONFUNCTION GetPi RETURNS REAL
RETURN 3.14159
ENDFUNCTIONFUNCTION IsOpen RETURNS BOOLEAN
RETURN TRUE
ENDFUNCTIONFUNCTION GetLimit RETURNS INTEGER
RETURN 100
ENDFUNCTIONFUNCTION GetPi RETURNS REAL
RETURN 3.14159
ENDFUNCTION