Match List-I with List-II
List-I List-II (A) try (I) Handles specific errors that may occur. (B) except (II) Block where exceptions are checked. (C) finally (III) Block that executes regardless of preceding block results. (D) raise (IV) Used to manually trigger an exception.
Match List-I with List-II
| List-I | List-II |
|---|---|
| (A) try | (I) Handles specific errors that may occur. |
| (B) except | (II) Block where exceptions are checked. |
| (C) finally | (III) Block that executes regardless of preceding block results. |
| (D) raise | (IV) Used to manually trigger an exception. |
Solution
✅ Correct Option: 1
| List I | List II |
|---|---|
| (A) try | (II) Block where exceptions are checked. |
| (B) except | (I) Handles specific errors that may occur. |
| (C) finally | (III) Block that executes regardless of preceding block results. |
| (D) raise | (IV) Used to manually trigger an exception. |
The risky code goes inside try. If it fails, the matching except block catches the error. The finally block runs whether or not an error occurred.
Do not swap try and except: try only watches for errors, while except is the one that handles them.
Related questions:
2025: 20 May Shift 1
2025: 16 May Shift 1
2026: 26 May Shift 1