Concept
Booleans (True / False)
Booleans represent yes/no answers: `True` or `False`. Rule #1: They **must** be capitalized. Writing lowercase `true` or `false` makes Python think you're typing undefined variables:
python
game_over = False
has_key = True
# 23. Booleans (True / False) Booleans represent yes/no answers: `True` or `False`. Rule #1: They **must** be capitalized. Writing lowercase `true` or `false` makes Python think you're typing undefined variables: ```python game_over = False has_key = True ``` Under the hood, `True` is secretly 1, and `False` is secretly 0.
Checkpoint
Why does writing `is_ready = true` in lowercase crash?
Practice
Create `online = True` and print `online`. Then print its type using `type(online)`.
01
Tap code blocks below to assemble
Available Blocks