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

Help with Task 1of 2

code attached... I dont understand why thats wrong

conditions.py
admitted = None
age >= 13
if admitted > 7:
    print ('admitted is true')

3 Answers

BRIAN WEBER
BRIAN WEBER
21,570 Points

For task 1 of 2, you're assuming that there is a variable age (not explicitly typed). Then you're supposed to check if age is greater than or equal to 13. If it is, set the variable admitted equal to True. You would complete this challenge like so:

admitted = None

if age >= 13:
    admitted = True

When you set a variable to be true, you need to use the following syntax, True. Make sure to capitalize the first letter. The same goes for False or None as well.

Hi Brian,

I think you meant to put

if age >= 13:

You already fixed it.

I made it before, and its showed me: Bummer! unorderable types: NoneType() >= int()

BRIAN WEBER
BRIAN WEBER
21,570 Points

My apologies. I meant to compare age to 13, not admitted. Please see my edited response.

THANKS:)