Ms. Whitby's Classroom logo Ms. Whitby's Classroom

Unit 05 — Conditional Execution

Prerequisite: Unit 04 — comparisons and Boolean logic

Learning goal: Use if, elif and else to choose actions according to changing conditions.

# Lesson Focus Points
1 Make a choice with if If statements and indentation 5
2 Two possible paths If and else 5
3 More than two outcomes Elif chains and mutually exclusive ranges 10
4 Build: Event Ticket Classifier Conditionals and Boolean logic together 15

Open the interactive lesson lab.

The browser’s public-example checks support practice. The GitHub grader checks submitted main.py files separately when a student opens a pull request.