Key Ideas
1What Are Conditionals?. Every real program needs to make decisions. Conditional statements let your program run different code depending on whether a condition is True or False. Without them,...
2Indentation — Python's Core Rule. Indentation in Python is not a style choice — it is the syntax. The interpreter uses indentation to determine which statements belong to which block. You must be consi...
3Combining Conditions. Use and, or, and not to build complex multi-part conditions inside an if statement. You already know these operators from Lesson 4 — now they become the backbone of yo...
4Nested Conditionals. You can place an if statement inside another if statement. This is called nesting. It's useful when a second decision only makes sense after a first condition is confi...
5Truthy & Falsy Values. In Python, any value can be used as a condition — not just booleans. Python automatically treats values as True (truthy) or False (falsy). This is one of Python's most...