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

Nikhil Alexander
Nikhil Alexander
1,444 Points

how should i involve -admitted- in the the code that i write further?

i am not able to prove that admitted is true.......... i am not sure how to include the admitted variable in the next lines of code please help me correct this error...

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

1 Answer

Daniel Turato
seal-mask
PLUS
.a{fill-rule:evenodd;}techdegree seal-36
Daniel Turato
Java Web Development Techdegree Graduate 30,124 Points

Hey,

What you have done so far is great but the question is asking you to set admitted to True if age is greater than or equal to 13. Therefore, you would need to do something like this:

admitted = None

if age >= 13:
    admitted = True

Admitted is holding initially the 'None' value which is effectively nothing, an empty variable. With python, you change that value to anything you want so in this case, you can easily change in to the boolean value of True.

Hope this helps, Daniel

Nikhil Alexander
Nikhil Alexander
1,444 Points

oh thank you so much for the help i was only confused whether we needed to actually write true...to prove the boolean value. really appreciate the detailed help.. thank you, Nikx222

GREAT answer this really helped me understand it. Thanks for the feedback Daniel!