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 trialJimmy Koyan
3,308 PointsIssues in the Python basics code challenge. "OK, one more. Add an else to your if. In the else, set admitted to False."
So the challenge is this "OK, one more. Add an else to your if. In the else, set admitted to False." and my solution to the question was the simple program
admitted = None age = 13 if age >= 13: admitted = True else: admitted = False
When I check the work the response is "Bummer! 'admitted' is not False"
I am not sure what's wrong here?
admitted = None
age = 13
if age >= 13:
admitted = True
else:
admitted = False
3 Answers
mocpanu paok
84 PointsYou don't have to set "age = 13" to your program. The test will check with different values of age
hossein tootoonchy
2,675 PointsHey Guys. My code doesn't pass successfully why ?!
admitted = None age = 13 if age >= 13: admitted = True else: admitted = False
hossein tootoonchy
2,675 PointsI have indented the code properly in my workspace, but when I copy paste it here, it would show is as one line.
Hashin Hassan
1,738 PointsI have the same problem. can't get past this bummer.
admitted = None
if age >= 13: admitted = True
else: admitted = False
mocpanu paok
84 PointsAs others have commented, you should indent your code properly.
Jimmy Koyan
3,308 PointsJimmy Koyan
3,308 PointsThank you!. That helped.