← Quiz: Python Conditions: all 13 questions
Quiz: Python Conditions · Question 6 of 13
What does this print? (code)
What does this print?
age = 17
print("adult" if age >= 18 else "minor")
- A.adult
- B.minor
- C.True
- D.An error
Answer & explanation
Correct answer: minor
The condition is false, so the else value is used.
Can you get the rest right without peeking?
Take the timed Quiz: Python Conditions quiz free. Pass it to earn XP and count towards your certificate.
Start the quiz →