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 | |
|---|---|---|
| 1lightOn = true | AStores the answer yes to the question 'is the light on?' | |
| 2isRaining = false | BA Boolean can only be true or false. 'maybe' is a third value, so it is not allowed. Use true or false. | |
| 3A Boolean can only ever be one of two values, like on and off in binary | CStores the answer no to the question 'is it raining?' | |
| 4A Boolean stores the answer to a yes/no question | DdoorOpen = true | |
| 5lightOn = maybe | EThe quote marks make it text, not a Boolean. Write true without quotes. | |
| 6isSunny = "true" | Ftrue or false |
Complete each line of code by filling in the missing parts.
Shade in the letter of the line that contains an error.
Boolean — A data type with only two possible values: true or false. It stores the answer to a yes/no question, like 'is the light on?', just like on and off in binary.light = Trueraining = Falsebigger = 5 > 3light = True
print(light)same = 7 == 7