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 trialAlfredo olivier
1,669 Pointsconditional value
i cant solve this
admitted = None
age = 14
if age >= 13
3 Answers
Wade Williams
24,476 PointsYou don't need to create an age variable, the age variable will be created for you. You have your conditional statement, now you just need to set admitted to True.
admitted = None
if age >= 13:
admitted = True
Christian Lamoureux
Full Stack JavaScript Techdegree Student 22,669 Pointsthe second task is getting me. I've got admitted = None if age >= 13: admitted = True else: admitted = False
and now it's claiming task 1 won't pass, any ideas?
Wade Williams
24,476 PointsI'm guessing you have an indentation error or other formatting error. I can't see the formatting of your code, but from your description our code matches and this passes.
admitted = None
if age >= 13:
admitted = True
else:
admitted = False
Christian Lamoureux
Full Stack JavaScript Techdegree Student 22,669 PointsThanks Wade! I cleaned up the indentation a little bit and now it's passing!
Keith Ostertag
16,619 PointsKeith Ostertag
16,619 PointsThe challenge states that HE will be making the age variable, so you don't need to do that. Just assume the age variable is already set, you just don't see it for now.
So, now "you (to) make an if condition that sets admitted to True if age is 13 or more."
You've got the condition, but you haven't added the statement to make 'admitted' = True based on that condition.
Try it.