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 Price : REAL | ADECLARE Age : INTEGER | |
| 2DECLARE IsMember : BOOLEAN | BPrice holds a money amount with pence, so it needs a number type that can store decimal places | |
| 3An age is a whole number that is used in calculations, so it is INTEGER because it has no decimal part | CA price has pence, so INTEGER would lose the decimal part. It should be REAL because it can hold decimals | |
| 4A single letter such as a first initial is stored as CHAR because it is exactly one character | DDECLARE Initial : CHAR | |
| 5DECLARE Address : INTEGER | EIsMember holds a two-valued fact that is either TRUE or FALSE, so BOOLEAN is chosen | |
| 6DECLARE Price : INTEGER | FAn address is text made of letters, numbers and spaces and is never used in calculations, so it should be STRING, not INTEGER |
Complete each line of code by filling in the missing parts.
Shade in the letter of the line that contains an error.
data type — Pick INTEGER, REAL, CHAR, STRING or BOOLEAN by what the value is and what you do with it, then justify with 'because'. Eg price is REAL because it has pence.// a person's age in whole years
DECLARE Age : INTEGER// a price such as 2.50 with pence
DECLARE Price : REAL// the first letter of a name
DECLARE Initial : CHAR// is the customer a member? TRUE or FALSE
DECLARE IsMember : BOOLEAN// house number, street and town
DECLARE Address : STRING