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!
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

tuukka uosukainen
22,107 PointsWhat is wrong with my code? SOLVED
I have trouble with this challenge: https://teamtreehouse.com/library/python-basics/logic-in-python/conditional-value
I think I have the right solution but I can't pass. I'd be very happy if someone more experienced Python programmer would point out what I'm doing wrong. Here is my code for the challenge:
admitted = None
if age >= 13:
admitted = True
else:
admitted = False
The error I get is: Oops! It looks like Task 1 is no longer passing.
2 Answers

Steven Parker
225,742 PointsAs you discovered, indentation is critical to Python's concept of grouping. Your original placement of the else put it inside the if group, without its own If.
Congrats on solving your own issue. You get a
for that.

tuukka uosukainen
22,107 PointsThanks for the star Steven!
tuukka uosukainen
22,107 Pointstuukka uosukainen
22,107 PointsOk, I figured it out. It seems that Python is very strict about how it's written. This passed the code: