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 trial3 Answers
Thomas Fildes
22,687 PointsHi Noel,
The correct code is below to complete the first task:
admitted = None
if age > 13:
admitted = True
Hope this helps! Happy Coding!!!
Nouh Ahmed
7,085 Pointsin the same challenge i have a problem with the second question. it say add an else part, inside it set admitted to False. But it says task one is not passing! I can't figure out what is wrong with my code.
admitted = None
if age > 13:
admitted = True
else:
admitted = False
James J. McCombie
Python Web Development Techdegree Graduate 21,199 PointsYour else block is indented too far, more it back in line with the if statement
James J. McCombie
Python Web Development Techdegree Graduate 21,199 PointsHello,
so you start off with admitted = None, on the screen. Out of sight someone has set age = ?unknown?, but just assume for clarity's sake that right above admitted = None, it is written age = 13.
just write an if statement below the admitted variable assignment, that says If the variable age is greater than or equal to 13, then in the block below the statement assign admitted to the value True