Booleans are a data type that can either be True or False (case sensitive). They are named after George Boole. You can think of these as a switch that is either on or off. It can be used to store if something has a certain attribute or if something specific has happened.
We will combine these with if statements and while loops to take certain actions only if something has a certain attribute or in response to something happening.
Some examples of appropriate boolean variables:
has_children (true means they have children, false means they don't)
has_paid (true means they've paid, false means they haven't)
is_pink (true means it's pink, false means they aren't)
is_visible (true means it is visible, false means it's not)
Naming convention suggests boolean variable names should often start with is or has.
For example:
is_married (true indicates married and false indicates not married)
is_even (true indicates an even number and false indicates odd)
has_clean_title
There are other ways to name a boolean to make it clear it is a boolean such as using past tense verbs.
For example:
mouse_clicked
button_pressed