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 trialEmilio Andere
495 PointsI do not understand the instructions
help
if admitted > 13
print("Cool")
admitted = 14
2 Answers
Steven Parker
231,275 PointsThe instructions say to test "if age is 13 or more", so you have the "more" part but you still need to include when it is 13. But they also say that when the condition meets the test the code "sets admitted to True
", you'll need to do that instead of the print (you won't need to print anything for this challenge*.
Also, don't remove the code line that was provided to set the initial value of admitted.
Emilio Andere
495 Pointsadmitted = None if age >= 13: admitted = True else admitted = False
Now this says that is incorrect!!!!!!!!!
Steven Parker
231,275 PointsPlease use formatting when posting code, otherwise it's impossible to see if the indentation is correct.
But otherwise it looks like you forgot the colon after the "else".
Emilio Andere
495 PointsEmilio Andere
495 Pointsadmitted = None if age >= 13 "sets admitted to True"
why is this wrong
Steven Parker
231,275 PointsSteven Parker
231,275 PointsWith no formatting, it's not possible to tell if your indentation is correct. But assuming that it is, your "if" line is missing the colon at the end, and the code that sets admitted to
True
would not be words in quotes but would look like this:admitted = True
Use the instructions for code formatting in the Markdown Cheatsheet pop-up below the "Add an Answer" area. Â Or watch this video on code formatting.