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 trialNico Romero
1,365 Pointselse to equal false
I don''t understand what the question is asking me, it says to create an else statement/comparison and so I create else as well and set admitted to false but marks it as incorrect
admitted = None
admitted = True
age = True
if age > 13:
print("admitted")
else:
admitted = False
3 Answers
Chris Freeman
Treehouse Moderator 68,441 PointsThe specific error is the last line is not indented far enough. It should be indented relative to the else
.
Beyond that, the code passes, but is not exactly like the desired result. Instead of always assigned admitted
to True
, move that line to replace the print statement line. Then admitted
is actually only set to true when age > 13.
Nico Romero
1,365 PointsHi Crhis, Thank you. I removed print and just made the comparisons instead. Thank you again for all your help!
Nico Romero
1,365 PointsSorry Chris, I spelled your name wrong
Chris Freeman
Treehouse Moderator 68,441 PointsNo worries. You can always edit your previous posts by selecting the three grey dots to the right of Add Comment / Best Answer.