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 trialronald brown
2,867 PointsElse portion not out for me.
Im trying to do the else portion of this statement i keep getting task one no longer working when i put the condition as 'age <= 13:' or even no condition, what should i do?
admitted = None
if age >= 13:
admitted = True
else age <= 13:
admitted = False
3 Answers
Wesley Trayer
13,812 PointsThe "else" statement doesn't take a condition because it is true if the "if" statement is false. So it should read:
else:
admitted = False
ronald brown
2,867 Pointsyeah i tried that as well and still got the same response
Wesley Trayer
13,812 PointsI don't see anything else wrong with your code, but I have occasionally found that by erasing the all of the code and pasting identical code, copied from somewhere else, into its place, it lets it pass.
Sorry, but I don't have any other ideas.
Wesley Trayer
13,812 PointsWell, I just redid the challenge, again, and I found that because had two spaces between "if" and "age >= 13" it failed me. Maybe you have an extra space somewhere.