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 trialEuan Maley
1,465 PointsTask two help!
My code for task one is working, and looks like this.
admitted = None age = 33 if age > 13: admitted = True
And that works. I move on to the other objective and do what it tells me, and my code looks like this.
admitted = None age = 33 if age > 13: admitted = True else: admitted = None
And it gives me an error saying to remove the age variable, so i do that and now task one is no longer passing. Help anyone?
admitted = None
if age > 13:
admitted = True
else: admitted = None
1 Answer
Ismail KOÇ
1,748 PointsDo not set age value, and
else: admitted = None
this challenge wants in second step : else, assign False to admitted