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 trialTim Baggenstos
916 PointsHelp on Challenge Task.
I am trying to complete a challenge task in the Python beginner course which has this text: I'm going to create a variable named age. I need you to make an if condition that sets admitted to True if age is 13 or more. It does not accept the code that I have included here. Please help!
admitted = None
age = None
if age > 13:
admitted = True
1 Answer
Jennifer Nordell
Treehouse TeacherHi there! First, the challenge is going to set the value of age, and your code is going to test it. By having the age = None
you are writing over what they're sending in, so you can safely remove that line. Also, your code should test if the age is 13 or more. But you're currently testing to only see if the age is more than 13. The person should also be admitted if they are 13.
Take another shot with these hints in mind, but let me know if you're still stuck!
Tim Baggenstos
916 PointsTim Baggenstos
916 PointsThanks, that worked!