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 trialJosue Bohorquez
426 PointsI don't know what I am doing wrong here.
It keeps telling me that Task 1 is no longer passing. Please help!
admitted = None
if age >= 13:
admitted = True
else:
admitted = False
angel moreta
2,912 PointsYour code is perfectly fine, all you have to do is indent backwards the "else:" statement and it's block of code
Dave StSomeWhere
19,870 PointsJust to be silly, improperly indented code is not perfectly fine - it is wrong in Python.
1 Answer
Mohammed Ismail
7,190 PointsJosue Bohorquez Hi Josue, The problem is with the indentation of the else block.
Here is the code to look at:
admitted = None if age >= 13: admitted = True else: admitted = False
Dave StSomeWhere
19,870 PointsDave StSomeWhere
19,870 PointsLooks like an indentation problem - is that how Kenneth coded an IF ELSE?