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 trialTal yoni
310 PointsHelp with Task 1of 2
code attached... I dont understand why thats wrong
admitted = None
age >= 13
if admitted > 7:
print ('admitted is true')
3 Answers
BRIAN WEBER
21,570 PointsFor task 1 of 2, you're assuming that there is a variable age (not explicitly typed). Then you're supposed to check if age is greater than or equal to 13. If it is, set the variable admitted equal to True. You would complete this challenge like so:
admitted = None
if age >= 13:
admitted = True
When you set a variable to be true, you need to use the following syntax, True. Make sure to capitalize the first letter. The same goes for False or None as well.
Tal yoni
310 PointsI made it before, and its showed me: Bummer! unorderable types: NoneType() >= int()
BRIAN WEBER
21,570 PointsMy apologies. I meant to compare age to 13, not admitted. Please see my edited response.
Tal yoni
310 PointsTHANKS:)
Jason Anello
Courses Plus Student 94,610 PointsJason Anello
Courses Plus Student 94,610 PointsHi Brian,
I think you meant to put
if age >= 13:
Jason Anello
Courses Plus Student 94,610 PointsJason Anello
Courses Plus Student 94,610 PointsYou already fixed it.