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 | |
|---|---|---|
| 1age >= 12 and age <= 15 | Aif score > 50 and time < 10: | |
| 2day == "Sat" or day == "Sun" | BEach side of or needs a full condition. It should be: if x > 5 or x < 10: | |
| 3not reverses a condition: True becomes False and False becomes True | CTrue only when BOTH conditions are True, so age must be from 12 to 15 | |
| 4and needs both conditions True before the code inside the if runs | Dand is a lowercase operator placed between two conditions, not a function. It should be: if age > 12 and age < 15: | |
| 5if x > 5 or < 10: | ETrue when at least ONE condition is True, so it is a weekend day | |
| 6if And(age > 12, age < 15): | Fif not raining: |
Complete each line of code by filling in the missing parts.
Shade in the letter of the line that contains an error.
and, or, not — Logical operators that combine or flip True/False conditions. and needs both True, or needs at least one True, and not reverses True to False (or False to True).if age > 12 and age < 20:
print("Teenager")if day == "Sat" or day == "Sun":
print("Weekend")raining = False
if not raining:
print("Play outside")sunny = True
warm = False
print(sunny or warm)if score > 50 and not cheated:
print("Pass")