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 trialJim Rakestraw
2,065 Pointsif/ Else statement exercise.
I do not understand task two of the exercise, when I set it to true it says admitted is not false. when I set admitted to False it says task 1 is no longer running.
admitted = None
age = 20
if age >= 13:
admitted = True
else:
admitted = False
2 Answers
Chris Freeman
Treehouse Moderator 68,441 PointsIn the challenge, you should not set the variable age
. It is set by the challenge grader. Comment out this line and it should pass!
Eli Goodwin
29,502 PointsI am not understanding what i am dong wrong here:
admitted = None
age = 30
if age >= 13:
admitted = True
else:
admitted = False
keeps telling me admitted is not False... it won't be, ever. What value is age supposed to be set to?
[MOD: added ```python formatting -cf]
Chris Freeman
Treehouse Moderator 68,441 PointsYou have set a value to age
that is interfering with the grader. Comment out age = 30
Jim Rakestraw
2,065 PointsJim Rakestraw
2,065 PointsI did set the age, its set to 20?
Jim Rakestraw
2,065 PointsJim Rakestraw
2,065 PointsNever mind I got it, Thank you very much! sorry for the misunderstanding.
Chris Freeman
Treehouse Moderator 68,441 PointsChris Freeman
Treehouse Moderator 68,441 PointsSorry. I left out the word "not". Answer updated. But you figured it out already!