Conditional Flow · Part 2
De Morgan's laws; refactoring nested into compound; guard clauses; membership sets.
Lesson 20 · Conditional Flow · Part 2 — Level II · Guide
October 8, 2026 · Bridge Academy Python Program
Learning goals
- Apply De Morgan's laws to simplify negations. - Refactor nested if into compound conditions. - Write guard clauses that exit early on invalid input. - Use membership (in, not in) to replace long or chains.
This lesson covers PCEP-30-02 objective 2.1.
Preview truncated — download the notebook to see the full lesson.