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 | |
|---|---|---|
| 1postcode: Text | APostcode was given a number type, so the leading zero is dropped and the postcode is now wrong | |
| 2price: Floating point | BStore a postcode as text because you never do maths on it and it can start with 0 (like 0800) | |
| 3Choose the data type by what you will do with the value, such as sorting events in order of when they happen | Chas_paid: Boolean | |
| 4A value that you only test as true or false should use the Boolean type | DStore a price as a number with decimals so you can add, multiply and work out totals | |
| 5postcode: Integer (0800 is stored as 800) | EPrice was given a text type, so values are joined together instead of added, giving a wrong result | |
| 6price: Text (total of $5 + $10 gives "510") | Fevent_date: Date/time |
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 the data type by what you will do with the value: calculate (number), sort by date (date/time), test true or false (Boolean). Postcodes are text, not numbers, as you never do maths on them.Postcode: TextPrice (e.g. 12.50): Floating pointDateJoined: Date/timeIsMember: BooleanQuantity: Integer
Total ← Quantity * 5