Welcome to the Treehouse Community
Want to collaborate on code errors? Have bugs you need feedback on? Looking for an extra set of eyes on your latest project? Get support with fellow developers, designers, and programmers of all backgrounds and skill levels here with the Treehouse Community! While you're at it, check out some resources Treehouse students have shared here.
Looking to learn something new?
Treehouse offers a seven day free trial for new students. Get access to thousands of hours of content and join thousands of Treehouse students and alumni in the community today.
Start your free trialPhilip Ollas
5,705 PointsI need you to make an if condition that sets admitted to True if age is 13 or more.
Hi,
I'm a bit stuck in here. Figure out what I've done wrong and what could I do to repair the error?
admitted = None
age = 13
if 13 > None:
print("true")
2 Answers
Steven Parker
231,275 PointsHere's a few hints:
- the challenge says it will create the variable age, so you don't need to
- you should test if age is 13 or more, but your test checks if 13 is greater than None.
- "13 or more" would be the same thing as "greater than or equal 13", so it needs a different comparison operator
- if the test passes, you need to set admitted to True
- you won't need to print anything
Philip Ollas
5,705 PointsFrank : Dude I really appreciate your answer as well....will take some notes of bought yours and Stevens answers. Happy coding!
Frank Campos
4,175 PointsFrank Campos
4,175 PointsSteven Parker
231,275 PointsSteven Parker
231,275 PointsFrank, you forgot my first hint.
You should not create or set the variable age. The challenge does that itself.
Philip Ollas
5,705 PointsPhilip Ollas
5,705 PointsThank you Steven, I really appreciate your answer.