Python Python Basics (2015) Logic in Python Conditional Value

Lalit Aditya
Lalit Aditya
400 Points

I'm going to create a variable named age. I need you to make an if condition that sets admitted to True if age is 13

How should I write the True condition?
admitted = None

1 Answer

Antonio De Rose
Antonio De Rose
20,575 Points

try break the question, if you are fluent with the lecture, but, if you are confused with the question, and don't know where to start, recommend you to repeat the video over and over

question asks set admitted to True if age is 13

just 2 steps step 1 checking for the condition, checking condition starts with 'if' then you normally check a variable here the variable is age then, the operator to check against the variable which is == now, it is to check the age against the value 13

step 2 setting the variable admitted to True you have done that part, but set up with none, where you have to change to True