Exceptions interview questions

15 real Exceptions questions from the Python bank, as asked in Indian campus drives and tech interviews. Every question has a verified answer and an AI-tutor explanation on placd — free to start.

1. What is try/except?

Junior
  1. A.the optional try-block section that runs only when no exception was raised in the protected code
  2. B.the construct that runs guarded code and catches raised errors in matching handler clauses
  3. C.the syntax that re-raises an error while explicitly chaining it to an originating cause for clearer tracebacks
  4. D.the clause whose body always executes on the way out of a try block, whether or not an error occurred
Reveal the answer + AI explanation — free account

3. Which statement is correct?

Junior
  1. A.try/except — the 3.11 container that bundles multiple unrelated errors, handled selectively with except* syntax
  2. B.try/except — the optional try-block section that runs only when no exception was raised in the protected code
  3. C.try/except — the clause whose body always executes on the way out of a try block, whether or not an error occurred
  4. D.try/except — the construct that runs guarded code and catches raised errors in matching handler clauses
Reveal the answer + AI explanation — free account

4. What is finally?

Junior
  1. A.the syntax that re-raises an error while explicitly chaining it to an originating cause for clearer tracebacks
  2. B.the clause whose body always executes on the way out of a try block, whether or not an error occurred
  3. C.the 3.11 container that bundles multiple unrelated errors, handled selectively with except* syntax
  4. D.the optional try-block section that runs only when no exception was raised in the protected code
Reveal the answer + AI explanation — free account

6. Which statement is correct?

Junior
  1. A.finally — the 3.11 container that bundles multiple unrelated errors, handled selectively with except* syntax
  2. B.finally — the optional try-block section that runs only when no exception was raised in the protected code
  3. C.finally — the construct that runs guarded code and catches raised errors in matching handler clauses
  4. D.finally — the clause whose body always executes on the way out of a try block, whether or not an error occurred
Reveal the answer + AI explanation — free account

7. What is else clause?

Mid
  1. A.the syntax that re-raises an error while explicitly chaining it to an originating cause for clearer tracebacks
  2. B.the clause whose body always executes on the way out of a try block, whether or not an error occurred
  3. C.the optional try-block section that runs only when no exception was raised in the protected code
  4. D.the 3.11 container that bundles multiple unrelated errors, handled selectively with except* syntax
Reveal the answer + AI explanation — free account

9. Which statement is correct?

Mid
  1. A.else clause — the optional try-block section that runs only when no exception was raised in the protected code
  2. B.else clause — the syntax that re-raises an error while explicitly chaining it to an originating cause for clearer tracebacks
  3. C.else clause — the 3.11 container that bundles multiple unrelated errors, handled selectively with except* syntax
  4. D.else clause — the construct that runs guarded code and catches raised errors in matching handler clauses
Reveal the answer + AI explanation — free account

10. What is raise from?

Mid
  1. A.the syntax that re-raises an error while explicitly chaining it to an originating cause for clearer tracebacks
  2. B.the clause whose body always executes on the way out of a try block, whether or not an error occurred
  3. C.the construct that runs guarded code and catches raised errors in matching handler clauses
  4. D.the optional try-block section that runs only when no exception was raised in the protected code
Reveal the answer + AI explanation — free account

12. Which statement is correct?

Mid
  1. A.raise from — the clause whose body always executes on the way out of a try block, whether or not an error occurred
  2. B.raise from — the construct that runs guarded code and catches raised errors in matching handler clauses
  3. C.raise from — the syntax that re-raises an error while explicitly chaining it to an originating cause for clearer tracebacks
  4. D.raise from — the optional try-block section that runs only when no exception was raised in the protected code
Reveal the answer + AI explanation — free account

13. What is ExceptionGroup?

Senior
  1. A.the syntax that re-raises an error while explicitly chaining it to an originating cause for clearer tracebacks
  2. B.the 3.11 container that bundles multiple unrelated errors, handled selectively with except* syntax
  3. C.the clause whose body always executes on the way out of a try block, whether or not an error occurred
  4. D.the construct that runs guarded code and catches raised errors in matching handler clauses
Reveal the answer + AI explanation — free account

15. Which statement is correct?

Senior
  1. A.ExceptionGroup — the construct that runs guarded code and catches raised errors in matching handler clauses
  2. B.ExceptionGroup — the optional try-block section that runs only when no exception was raised in the protected code
  3. C.ExceptionGroup — the syntax that re-raises an error while explicitly chaining it to an originating cause for clearer tracebacks
  4. D.ExceptionGroup — the 3.11 container that bundles multiple unrelated errors, handled selectively with except* syntax
Reveal the answer + AI explanation — free account

Free to start

Answers, AI explanations, and a scored voice mock interview

Sign up free to check your answers with explanations, ask the AI tutor anything on any question, and take one full AI mock interview — scored like a real panel.

Practice Exceptions free