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 trialNick Limber
601 Pointsconditions.py
what did I do wrong
admitted = None
admitted = age
age = 13
if age>= "13"
print("True")
2 Answers
Steven Parker
231,275 PointsHere's a few hints:
- don't set the value of age, the challenge says that it will do that itself
- don't change the value of admitted before performing the test
- never put a number in quotes (unless you want to create a string instead of a number)
- you won't need to use "print" for this challenge
- an "if" statement should end with a colon (":")
- after the "if" you need to assign admitted with the value of True
- True is a special value, that like a number should not be enclosed in quotes
K Cleveland
21,839 Pointsadmitted = age
age = 13
if age>= "13"
print("True")
I def see what you're trying to do! However, don't worry about the "age" variable. Kenneth tells us that he's going to create that variable. So really, all you need to do is make an if statement that sets the admitted variable to True.
Look back at this:
if age>= "13"
print("True")
The challenge asks you to set admitted to True if age is 13 or more. Did you do that? Look back what at setting variables. Also, should you use 13 as a string or an integer? Good luck, you're almost there. :)
Nick Limber
601 Pointsthank you both so much
K Cleveland
21,839 PointsK Cleveland
21,839 PointsYes, also like this. :)