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
Daniel Turato
Java Web Development Techdegree Student 17,639 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!