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 trialBo Chen
Courses Plus Student 848 PointsHow do you do this
On task one, it pops up with an error that says that the task must pass, so I set age to 13. But then on task two it pops up with an error that says not to set the age variable.
admitted = None
age = 13
if age >= 13:
admitted = True
else:
admitted = False
2 Answers
Josh Keenan
20,315 PointsHere's my solution:
admitted = None
if age >= 13:
admitted = True
else:
admitted = False
The age isn't something you create, the challenge just passes it in magically to test your code!
Gilbert Craig
2,102 Pointsthe task does not ask you to declare a variable 'age' or assign a value to it, nor to provide and 'else' statement
If you remove the second and last 2 lines it will work
Bo Chen
Courses Plus Student 848 PointsJust so you know, the last two lines of code were for the second task, but thanks for trying to help
Bo Chen
Courses Plus Student 848 PointsBo Chen
Courses Plus Student 848 PointsThanks
Josh Keenan
20,315 PointsJosh Keenan
20,315 PointsHappy to help!