Welcome to the Treehouse Community
The Treehouse Community is a meeting place for developers, designers, and programmers of all backgrounds and skill levels to get support. Collaborate here on code errors or bugs that you need feedback on, or asking for an extra set of eyes on your latest project. Join thousands of Treehouse students and alumni in the community today. (Note: Only Treehouse students can comment or ask questions, but non-students are welcome to browse our conversations.)
Looking to learn something new?
Treehouse offers a seven day free trial for new students. Get access to thousands of hours of content and a supportive community. Start your free trial today.

Christian Geib
826 PointsChallenge task 1 of 2 -not sure how to go about age true or false
No quite sure what I am supposed to do here. The question appear sto ask me not to set an age and instead worry about the IF condition. My apporoach
if not age >= 13: admitted = False else: admitted = True
does not seem to work . Any advice?
if not age >= 13:
admitted = False
else:
admitted = True
2 Answers

Thayer Y
29,789 Pointsadmitted = None
if age >= 13:
admitted = True
else:
admitted = False

suliman alkous
Courses Plus Student 5,139 Pointscheck the spaces else should be on same column of "if"
admitted = None
if age >= 13:
admitted = True
else:
admitted = False

Christian Geib
826 PointsThanks Suliman for the quick response & your instruction, your rock! Much appreciated!

Christian Geib
826 PointsBtw, Thayer, when I enter the code you suggested,
admitted = None if age >= 13: admitted = True else: admitted = False
and I click on 'Check work', I receive the following error notice: Bummer! invalid syntax (<string>, line 5)
Any idea why that is?
Christian Geib
826 PointsChristian Geib
826 PointsThanks, Thayer, for the quick, super helpful response. Much appreciated!
Christian Geib
826 PointsChristian Geib
826 PointsBtw, Thayer, when I enter the code you suggested,
admitted = None if age >= 13: admitted = True else: admitted = False
and I click on 'Check work', I receive the following error notice: Bummer! invalid syntax (<string>, line 5)
Any idea why that is?