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 trialJoe Thompson
2,343 PointsAnswer for Q2: admitted = None if age >= 13: admitted = True else: admitted = False
This code gets "step 1 no longer passes" error.
3 Answers
Alx Ki
Python Web Development Techdegree Graduate 14,822 PointsHi, Joe Thompson ! Check your indentation.
if ......:
......
else:
.....
Joshua Clark
6,186 PointsOn task 2 "OK, one more. Add an else to your if. In the else, set admitted to False." I can't seem to figure out why it won't let me use the else. I have double checked my indentation and still am having an issue. My code looks as shown:
'''admitted = None age = 13 age >= 13: admitted = True else: admitted = False'''
Joe Thompson
2,343 PointsThank you Alexey! Changing the indenting to your example fixed the problem and the autograder liked it. Thank you.
Joe