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 TotalToPay : REAL | AA REAL must have a digit after the decimal point, so 12. is invalid. It should be 12.0. | |
| 2Height ← 0.3 | BCount ← 5 Length ← 5.0 | |
| 35 is an INTEGER because it has no decimal point, but 5.0 is a REAL | CTemperature ← -4.0 | |
| 4A negative REAL still has a digit on each side of the point, even when its fractional part is zero | DA REAL must have a digit before the decimal point, so .5 is invalid. It should be 0.5. | |
| 5Price ← .5 | ECreates a variable that can store a number with a fractional part, such as a price | |
| 6TotalToPay ← 12. | FAssigns a REAL literal with a digit on each side of the point |
Complete each line of code by filling in the missing parts.
Shade in the letter of the line that contains an error.
REAL — The data type for a number that can have a fractional part, written with a digit on each side of the point, such as 4.7 or 0.3. 5 is an INTEGER but 5.0 is REAL.DECLARE Price : REAL
Price ← 4.7DECLARE Height : REAL
Height ← 1.5DECLARE Distance : REAL
Distance ← 5.0 // five as a REAL valueDECLARE TotalToPay : REAL
TotalToPay ← 12.5DECLARE Count : INTEGER
Count ← 5