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 trial

Python Python Basics (2015) Logic in Python Conditional Value

am failing to get the implied sense from the error message

there is a question about if statements which needs to have two variable with one having none being supposed to be true

conditions.py
admitted = None
age = 10
if age >= 13:
    # moderator redacted print statement for inappropriate content
    print("...")
    elif admitted < age:
        print("Still a young fella!")
Jennifer Nordell
seal-mask
.a{fill-rule:evenodd;}techdegree
Jennifer Nordell
Treehouse Teacher

Hi there, Clainos Machemedze! I've redacted the code in your question to remove a sexual reference. Please refer to the Treehouse Code of Conduct for more information and guidelines about using the Community. :sparkles:

1 Answer

Hey Claninos! Your a little off topic here, it dosent really seem that youve followed the instructions, Your code really dosent have anything to do with what the challenge is asking you to, ill try to break it down here:

  • Create an if statement that check if age <= 13
  • If that is the case set the variable admitted to True
  • Add an else statement that sets admitted to false, if its not bigger than or equal to 13 Lastly, dont create the age variable yourself, it has already been created. Ive posted the correct solution below, but try to solve it yourself before looking at it: Please write back if you need more help!