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 trialDuarte Reis
Python Web Development Techdegree Student 897 Pointscan\t get past the challenge
If age => 13:
admitted = "True"
admitted = None
if age => 13:
admitted = "True"
3 Answers
andren
28,558 PointsThere are three mistakes in your code:
You have written if with a capital I, most programming languages (including python) are case-sensitive, this means that If, if and iF are not considered to be the same word, and getting the capitalization right when using keywords like if is essential.
The greater or equal to operator is: ">=" not "=>" the order of the symbols matter.
When you use double quotes you are telling Python to treat your text as a string value, so you are setting admitted equal to a string with the text "True", which is different from the boolean value True, boolean values are typed without quotes, just like numbers and variables.
Fixing those three mistakes results in this code:
admitted = None
if age >= 13:
admitted = True
Which is the solution to the first task of the challenge.
Ken Alger
Treehouse TeacherDuarte;
Small syntax changes are needed in your code. You are wanting greater than or equal
s to, have a look at the documentation for what the proper comparison operator is for that comparison. Also, should you be setting admitted
to a string?
Post back if you are still stuck.
Happy coding,
Ken
Duarte Reis
Python Web Development Techdegree Student 897 PointsHey guys! Thanks a lot. Stupid mystakes! :/
Thanks for the help!