> ## 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 12: Exceptions

> Recognize the built-in exceptions Python raises and handle them with try and except.

| | |
| - | - |
| **Exam** | PCEP-30-03 |
| **Section** | 4. Functions and Exceptions (20% of the exam) |
| **Objectives** | 4.2.1 and 4.2.2 |
| **Exam questions** | About 2, 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).

## 4.2.1 Explain and recognize basic Python exceptions

* Explain the purpose of exceptions in Python programs.
* Explain how an exception interrupts the flow of program execution.
* Recognize common situations in which Python raises exceptions.
* Recognize basic built-in exceptions, including `ValueError`, `TypeError`, `ZeroDivisionError`, `IndexError`, `KeyError`, and `NameError`.
* Relate common exception types to the operations that may cause them.

## 4.2.2 Handle runtime exceptions with `try` and `except`

* Use `try` and `except` to handle runtime exceptions.
* Handle specific exception types using one or more `except` branches.
* Use multiple `except` branches to handle different exception types.
* Trace simple exception-handling flow when an exception occurs or does not occur.


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