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 trial
Name:GoogleSearch orJonathan Sum
5,039 PointsI need you to make an if condition that sets admitted to True if age is 13 or more.
admitted = None if admitted >= 13: admitted = True Bummer! unorderable types: NoneType() >= int() What is unorderable types: NoneType() >= int()?
4 Answers
tobiaskrause
9,160 PointsTry admited = 0... None and 13 (integer) are two different type of objects. In you if-statement you have to compare objects from the same type. So use 0 instead of None
Edit: I actually would avoid using None at all if possible
Name:GoogleSearch orJonathan Sum
5,039 PointsTobias Krause i am just saying Mrs. Love should focus on teaching how it works ,instead of telling what to do.
Nicolas Bassano
2,125 PointsHi Jonathan,
I think what Tobias means is that he needs you to provide the link for the challenge so he can help you with the challenge and maybe explain how it works and why.......
OBS!!! It is always better if you can also markdown the code youre posting so it will appear like this:
markdown = "easier to read"
Cheers
Name:GoogleSearch orJonathan Sum
5,039 PointsNicolas Bassano,thx for replying. i think i know what i didn't understant. I don't really need some1 to explain to me. if i dont understand anything later. i will ask.
Name:GoogleSearch orJonathan Sum
5,039 PointsName:GoogleSearch orJonathan Sum
5,039 Pointsit seem to be admitted = None if age >= 13: admitted = True else: admitted = False i guess The point is admited is a non for to be edited by if statment below. value age doesn't have a value ,and it is still able to use it in if statment. i guess that is because how if statment works. I feel: Mrs. love should focus more teaching us how it works ,instead of just telling how to wite his own programme in his video. This can't pass the Challenge Task ,and i don't think i can write a programme in outside world.
tobiaskrause
9,160 Pointstobiaskrause
9,160 PointsPls post a link of that challange :)
Name:GoogleSearch orJonathan Sum
5,039 PointsName:GoogleSearch orJonathan Sum
5,039 Pointsnvm, admitted = None if admitted >= 13: admitted = True
i though i can't change "if admitted" to "if age" because age is not definded. Now i understand that it can. Although the age is not defined.,but........ why Mr.love didn't explain this?