Skip to main content
Loading page…
Python Mastery
Chapter 2
Lesson 3 of 4
Booleans, Comparisons & Logic
Contents
Notes
Tutor
Concept
True, False, and the bool Type
Loading activity…
Previous
1 / 9
Continue
Contents
Notes
Discussion
Tutor
20 min
9 activities
0 of 9 done
In this lesson
1
True, False, and the bool Type
2
Boolean Operators: and, or, not
3
Short-Circuit Evaluation
4
Truthiness: Every Object Has a Boolean Value
5
Worked Example: Ticket Price Calculator
6
Check: Short-Circuit Evaluation
7
Truthiness Quick Fire
8
Practice: Leap Year Checker
9
Common Bug: `=` vs `==` in Conditions
Objectives
Evaluate comparison and boolean expressions and predict their result
Predict the truthiness of any Python value and use short-circuit evaluation correctly
Chapter 2 · Variables, Types & Operators
Variables, Objects & Assignment
Numbers: int, float, and Arithmetic
Booleans, Comparisons & Logic
Input, Output & Type Conversion
Previous: Numbers: int, float, and Arithmetic
Next: Input, Output & Type Conversion