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 trialjonathan arriaga
416 Pointshaving issues understanding why task 1 is no longer passing after i right this code? i believe it should be correct
looks my code is correct need help
admitted = None
if age = 13:
admitted = True
else:
admitted = False
1 Answer
Alexander Davison
65,469 PointsTwo mistakes:
- You are using the
=
operator to check equality. Python thinks that you are trying to make a variable. You need to use==
to check equality so that Python understands that you aren't making a variable. - The last two lines are indented too far. Python thinks that there's a
else
clause inside theif
clause. You need to de-dent the line a little more.
jonathan arriaga
416 Pointsthank you for the information! i figured out the problem had to many indentations. and i guess i had to skip a line before writing the if block
Abdishakur Hassan
3,585 PointsAbdishakur Hassan
3,585 Pointsage = age == Are different. Try ==