Making Decisions with if, elif and else
Compare values, make your program choose between paths with if, elif and else, combine conditions with and, or and not, and understand why indentation matters so much in Python.
Part of Python for AI and Data, module 2: Decisions, Loops and Collections
What you will learn
- Task 1: Comparing values
- Task 2: if and else
- Task 3: More than two choices: elif
- Task 4: Combining conditions: and, or, not
- Task 5: Practice: a loan eligibility check
Key terms in this lesson
Start learning free
This lesson is part of the Premium. Create a free account to start with the free lessons first.