Python Python Basics (2015) Logic in Python Conditional Value

where I"m going work with if statement in python quiz

I was setting admitted to true . Its not working

conditions.py
admitted = None

if age >= 13:
     admitted = "True"
else:
    admitted = "False"

1 Answer

Manish Giri
Manish Giri
15,656 Points
if age >= 13:
     admitted = "True"
else:
    admitted = "False"

You're setting the admitted variable to the string value "True" or "False", since you used quotes. Boolean values True and False are used without the quotes.

Thank you