CHAPTER 12 •
PYTHON
Python Booleans
Learn True and False values in Python.
01 What is this?
Learn True and False values in Python.
02 Syntax
Python Syntax
True False
03 Example
Python Example
is_student = True is_admin = False print(is_student) print(is_admin)
04 Important Points
Boolean values are commonly used in conditions.
05 Common Mistakes
True and False must start with capital letters in Python.
06 Real World Use
Booleans are used for login status, permissions and conditions.
07 Practice This Topic
Now try the example yourself in the AIFA Python Editor.
- Read the example carefully.
- Change the values.
- Run the code.
- Observe the output.
- Try creating your own example.