HomeTracks
Explorer···
THEEBUG
Completed0/9
Score0
PYlesson5.py×
THEEBUGlesson5.py
1
def check_age(age):
2
if age ______ 18:
3
return "You can vote!"
4
return "Too young"
5
 
6
print(check_age(20)) # "You can vote!"
7
print(check_age(15)) # "Too young"
$[system] Theebug ready. Happy coding!
Code BlocksDrag blocks into the drop zones above
5 blocks available
>=
<=
==
!=
>
Game Panel
0:000 pts
Level 5 of 9Conditionals
0/1 slots correct
Objective
Add the right comparison operator to check if age is 18 OR older
Expected Output
"You can vote!"
"Too young"
Debug says:
The condition should be true when age is 18 OR older! Which comparison operator means "greater than OR equal to"? Not just greater than — equal counts too!
Debug the Worm