AQA A-Level Computer Science · Section 4.1 Fundamentals of Programming
| Exception | Cause | Example |
|---|---|---|
| ValueError | Wrong value type/format | int("abc") |
| ZeroDivisionError | Division by zero | 5 / 0 |
| IndexError | Index out of bounds | list[10] |
| TypeError | Wrong data type operation | "5" + 3 |
| FileNotFoundError | File doesn't exist | open("x.txt") |
| KeyError | Dictionary key not found | d["missing"] |