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 trialHasan Khalid
380 PointsCan you please help me understand?
I dont think I need the variables but it passed Task 1 when I set admitted = True
admitted = None
admitted = True
admitted = False
if age >= 13:
admitted == True
else:
admitted == False
Jonathan Mitten
Courses Plus Student 11,197 PointsYou do not need to set your admitted
variables at the top - you're overwriting the None
with True
, and then the True
with False
anyway.
Your conditional statement has the correct syntax, but your assignments of admitted == True
should be admitted = True
. It's an assignment.
1 Answer
Steven Parker
231,236 PointsYou should not add any code above the "if" line. but you managed to "fool" the validator with it one time.
But on the lines below the "if", you have comparisons ("==") where you should have assignments ("=").
Conary Beckford
Full Stack JavaScript Techdegree Student 5,046 PointsConary Beckford
Full Stack JavaScript Techdegree Student 5,046 PointsAre you sure the variable admitted should be the same for all three values?