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 trialPatrick Akera
492 Points'admitted' is not False.
task one seems to pass, task 2 isn't :/ thanks in advance for the help.
admitted = None
if age >= 13:
admitted = "true"
else:
admitted = "false"
[MOD: fixed formatting -cf]
2 Answers
Kevin Faust
15,353 PointsI dont know how you passed task 1 as your supposed to assign a boolean NOT a string. So True and False
admitted = None
if age >= 13:
admitted = True
else:
admitted = False
Abraham Juliot
47,353 Points"This is correct answer" also works for task 1. Actually, any numeric value, string value, or object is True, except None, False, 0, ' ', ( ), [ ], { }.
Joyful coding to you :)
Patrick Akera
492 PointsThanks Abraham :)
Patrick Akera
492 PointsPatrick Akera
492 PointsThanks, it's odd though, my first answer wasn't a string, and it still didn't work then. the only difference this time was that i capitalised the T and F in true/false and it worked.
Kevin Faust
15,353 PointsKevin Faust
15,353 PointsYea keep in mind that unlike other programming languages, python needs its booleans capitalized