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 trialcharvakthatha
450 PointsWhat's wrong with my code
I don't what's wrong, it says that there was no 'if' in my code
age = 14
admitted = age
if admitted > age:
print("True")
2 Answers
Carlos Federico Puebla Larregle
21,074 PointsIn the code challenge it says that he is going to create the variable "age" for you, so you don't need to create it. And if the "if" condition passes, you have to set the "admitted" variable to "True". Here's a way to do that:
admitted = None
if age >= 13:
admitted = True
I hope that helps a little bit.
charvakthatha
450 PointsOh, okay I get it now, thanks