Sometimes we have a need for variables that are either true or false. This datatype, which can only ever take one of two values, is called a boolean. In Python, we define booleans using the keywords
a = True b = False
A boolean is actually a special case of an integer. A value of
True corresponds to an integer value of
1, and will behave the same. A value of
False corresponds to an integer value of
Someone has introduced themselves to you using comments in script.py.
Read the comments and then create a variable called
age_is_12 and set it to be
False depending on if this person’s age is 12.
Create a variable called
name_is_maria and set it to be
False depending on if this person’s name is Maria.