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 trialJustin Ricke
Courses Plus Student 345 PointsWhat am I doing wrong, I keep getting the error that task one is no longer executing. my code is below:
admitted = None
if age >= 13:
admitted = True
else:
admitted = False
admitted = None
[MOD: added ```python markdown formatting -cf]
2 Answers
Jennifer Nordell
Treehouse TeacherIt's a bit hard to read your markdown here in the question, but I don't see anything blatantly incorrect. Could it be an indentation error, I wonder? Try this:
admitted = None
if age >= 13:
admitted = True
else:
admitted = False
I see two separate lines saying admitted = None. If that's actually in there twice, it could cause it to fail.
Justin Ricke
Courses Plus Student 345 PointsIt was the indentation!
Thanks,
Jennifer Nordell
Treehouse TeacherYou're quite welcome! :)
Justin Ricke
Courses Plus Student 345 PointsJustin Ricke
Courses Plus Student 345 PointsNot sure why admitted was in twice I think that just is how it copied I only have it once in my code. Thanks for your help!
Chris Freeman
Treehouse Moderator 68,441 PointsChris Freeman
Treehouse Moderator 68,441 PointsIn the OP, the second
admitted = None
was added by the help system automatically adding the current state of the challenge code which was simply this statement. The code above it was manually added by Justin. After reformatting Justin's post, it becomes evident Jennifer's answer is correct.Justin, also note that often the message "Task 1 is no longer passing" indicates a syntax error has been introduced that causes all tasks to fail. In this case, the syntax error is the improper indentation.
Jennifer Nordell
Treehouse TeacherJennifer Nordell
Treehouse TeacherThanks Chris Freeman for clearing up that markdown and explaining the "extra" admitted = None. I wasn't really sure why it was displaying that way... now I know! :)