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 trialzachariah simael
2,157 Pointsi'm trying to type an if condition to make a variable named admitted = None true. How do I do this?
In need of help on how to do this.
admitted = None
age = 13
if 13 > None
2 Answers
Haider Ali
Python Development Techdegree Graduate 24,728 PointsHi there, I see you are having trouble with the first task in this challenge. Well, firstly, you are not required to define the age
variable since the challenge says it will be defined for you. Next, in your conditional statement, your condition should check to see whether the value stored in the age variable is greater than or equal to thirteen. This can be done by using the >=
operator. If the condition evaluates to True
, you should set admitted
to True
. Here is what your code should look like:
admitted = None
if age >= 13:
admitted = True
If you have any further questions please feel free to leave a comment :)
Thanks,
Haider
Jeremy Hill
29,567 Pointsadmitted = None
age = 13
if age >= 13:
admitted = True