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 trial

Python Python Basics (2015) Logic in Python Conditional Value

Abraham Yeransian
Abraham Yeransian
10,771 Points

Makes no sense

Keeping getting error with the <string> for admitted = None

conditions.py
admitted = None
if admitted >== 13
    admitted = True

4 Answers

Matthew Long
Matthew Long
28,407 Points

Reread the challenge. It is asking you to set admitted to True if age is greater than or equal to 13. Also, don't forget the colon after your condition.

admitted = None
if age >= 13:
    admitted = True
Abraham Yeransian
Abraham Yeransian
10,771 Points

Thank you! :D I will try this. My code (I thought) made sense, if greater or equal to 13 then set the variable to True. Still new, I will get the hang of it.

Abraham Yeransian
Abraham Yeransian
10,771 Points

How come the following code is still not working? admitted = None if admitted >== 13 admitted = True

I was thinking that if admitted was greater or equal to 13 than the variable would be reassigned to 'True' I fixed the equal sign on the if condition but still notta

Matthew Long
Matthew Long
28,407 Points

Instead of thinking about the code programmatically. Take a second to think about it logically or as if it's simple english. It doesn't make sense to check if admitted is greater than or equal to 13, but instead if age is greater than or equal to 13. In plain english, "If age is greater than or equal to 13 then admitted."