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

faysal Garaad
faysal Garaad
303 Points

CODE CHALLENGE

I'm asked to set addmited to true if the age is 13 or more but this is not working for me

conditions.py
admitted = "None"
if age is => 13:
    print ("True")

2 Answers

David Deberry
David Deberry
5,447 Points

Hey your code is close but you have the >= in the wrong order. Make sure the equal to is always last.

if age >= 13:
    admitted = True
faysal Garaad
faysal Garaad
303 Points

Thank you david that was helpful

Steven Parker
Steven Parker
229,708 Points

You're on the right track, but you have a few issues yet:

  • the word "is" won't be needed in the comparison expression
  • instead of "=>", the symbol for "greater or equal" is ">="
  • if the condition passes, you still need to set admited to True, but you won't need to "print" anything
faysal Garaad
faysal Garaad
303 Points

Thank you steven i did it and it passed