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 | |
|---|---|---|
| 1DECLARE NumStudents : INTEGER | ADECLARE NumSeats : INTEGER | |
| 2DECLARE AverageMark : REAL | BDECLARE Price : REAL | |
| 3A price can include pence or cents, so it needs a data type that allows decimals | CAn average mark can have a decimal part, so it should be declared as REAL. INTEGER cannot store 72.5. | |
| 4A value that is always a whole number, such as the number of seats in a room, uses INTEGER | DStores a count of students, which is always a whole number | |
| 5DECLARE AverageMark : INTEGER AverageMark ← 72.5 | EStores an average mark, which might have a decimal part | |
| 6DECLARE NumStudents : REAL | FA count of students is always a whole number, so INTEGER is the better choice. REAL is not needed here. |
Complete each line of code by filling in the missing parts.
Shade in the letter of the line that contains an error.
INTEGER or REAL — Use INTEGER for values that are always whole numbers, like a count of students. Use REAL if the value could have a decimal part, like a price or an average mark.DECLARE NumStudents : INTEGERDECLARE Price : REALDECLARE AverageMark : REAL
AverageMark ← 72.5DECLARE NumTickets : INTEGER
NumTickets ← 4// Pocket money may include cents later
DECLARE PocketMoney : REAL