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 DefaultLine() | AA valid Pascal case procedure name: capital letter at the start of each word, with letters only | |
| 2FUNCTION SumSquare(Num : INTEGER) RETURNS INTEGER | BPROCEDURE ShowScore2() | |
| 3A descriptive Pascal case name tells the reader what the subroutine does | CThe name starts with a digit. A subroutine name must start with a capital letter, for example SumSquare. | |
| 4A name may contain digits, but it must start with a capital letter and not a digit | DA valid Pascal case function name made of two capitalised words joined together | |
| 5PROCEDURE default_line() | EThe name uses an underscore and starts with a lowercase letter. Pascal case needs DefaultLine with no underscore. | |
| 6FUNCTION 2DSum(A : INTEGER) RETURNS INTEGER | FFUNCTION CalculateTotal(Price : REAL) RETURNS REAL |
Complete each line of code by filling in the missing parts.
Shade in the letter of the line that contains an error.
CalculateTotal — A Pascal case subroutine name: it starts with a capital letter, each word is capitalised, and it uses only letters and digits, with no spaces, no underscores and no starting digit.PROCEDURE DefaultLine()
OUTPUT "----------"
ENDPROCEDUREFUNCTION SumSquare() RETURNS INTEGER
RETURN 3 * 3 + 4 * 4
ENDFUNCTIONFUNCTION CalculateTotal() RETURNS INTEGER
RETURN 10 + 20
ENDFUNCTIONPROCEDURE CalculateTotal()
OUTPUT 10 + 20
ENDPROCEDUREFUNCTION SumSquare() RETURNS INTEGER
RETURN 3 * 3 + 4 * 4
ENDFUNCTION