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 trialBenjamin Guyton
6,858 Pointschange admitted to true
I'm not sure how to change admitted from None to true, even thought the if statement is clearly true. I've tried quite a few things and it keeps returning that admitted is not true.
admitted = None
age = 88
if age >= 13:
admitted
2 Answers
Greg Kaleka
39,021 PointsHi Benjamin,
You've checked to see if you should set admitted to True, but you haven't actually set admitted to True. You have to make that happen.
Here's a clue:
- On the first line, you set admitted to None
- On the second line, you set age to 88
- On the fourth line, you need to set admitted to True
Also, Kenneth says he's going to set a variable called age
, so you don't have to. You can delete the second line. You just have to set admitted to True if age is 13 or older. You're doing that check correctly. Now you just have to set admitted to True if that condition is met.
Let me know if you figure it out or if you have other questions!
Cheers
-Greg
AJ Salmon
5,675 PointsHey Benjamin!
When setting an object to a boolean, the proper syntax is object = True. Also, you don't need to create an age variable in this challenge, as the challenge itself creates the variable when you check your work :)