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

If Challenge

The question says that if age is greater than or equal to 13, then admitted variable should be a boolean true, where the initial line of the code says admitted = none. Can someone please make suggestions? Here is what I had written:

admitted = None if age >= 13: admitted != None

conditions.py
admitted = None
if age >= 13:
    admitted != None

3 Answers

Manish Giri
Manish Giri
16,266 Points

admitted is by default assigned a value of None. In the if block, if age >= 13:, then you assign True to admitted.

How do you assign a True? A value of none is False. I tried giving it a number value of 2 and it says "make sure admitted is set to the Boolean true not to a string"

I got the answer. But I dont understand why that first line says "admitted = None"?