> ## Documentation Index
> Fetch the complete documentation index at: https://python-training.ipoint-labs.com/llms.txt
> Use this file to discover all available pages before exploring further.

# Module 4: Conditional execution

> Branch your program with if, if-else, and if-elif-else, and trace which path runs.

| | |
| - | - |
| **Exam** | PCEP-30-03 |
| **Section** | 2. Control Flow: Conditional Blocks and Loops (23% of the exam) |
| **Objectives** | 2.1.1, 2.1.2, and 2.1.3 |
| **Exam questions** | About 3, one per objective |

By the end of this module you can do everything below. The objectives and their wording come from the [official PCEP-30-03 syllabus](https://pythoninstitute.org/pcep-exam-syllabus).

## 2.1.1 Control program flow using `if` and `if-else` statements

* Use an `if` statement to execute code when a condition is true.
* Use an `if-else` structure to select between two execution paths.
* Construct conditions using Boolean expressions.
* Trace which branch is executed based on the result of a condition.
* Recognize when a conditional block is skipped.

## 2.1.2 Select among multiple execution paths using `if-elif-else` statements

* Use an `if-elif` structure to evaluate multiple conditions.
* Use an `if-elif-else` structure to provide a fallback execution path.
* Explain that conditions are evaluated in order until a matching branch is found.
* Trace the execution of multi-branch conditional structures.
* Recognize incorrectly ordered, redundant, or unreachable conditional branches.

## 2.1.3 Construct compound and nested conditional structures

* Use multiple conditional statements within the same program.
* Nest conditional statements inside other conditional branches.
* Combine Boolean expressions within conditional structures.
* Trace the execution of compound conditional structures.
* Identify unreachable, redundant, or incorrectly ordered conditional branches.


This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.