Step 1: Understanding the Question:
The question presents four statements (A, B, C, D) about Python's built-in exception-handling blocks and asks to identify which statements are correct.
Step 2: Python Exception Handling Framework:
- try block: Monitors and intercepts any run-time errors (exceptions) raised during its execution.
- except block: Catches and handles specific exceptions thrown by the matching try block.
- else block: Executes only if no exceptions were raised during the execution of the try block.
Step 3: Detailed Evaluation of Statements:
- Statement A is correct: The try block is where we enclose code that may cause errors, acting as the interceptor to catch any exceptions.
- Statement B is correct: If an exception is raised in the try block, execution of the try block stops immediately and transfers to the except block to handle the error.
- Statement C is correct: Python allows us to write multiple except blocks to handle different error types separately (e.g., except ValueError followed by except ZeroDivisionError).
- Statement D is correct: The optional else block is defined to execute only if the code in the try block runs successfully without raising any exceptions.
- Since all four statements are correct, Option (C) is the right choice.
Step 4: Final Answer:
All the statements A, B, C, and D are correct descriptions of Python exception handling.
Hence, option (C) is the correct choice.