Try-except-finally and exception types Theory
Concept ID: U1_EXCEPTION_HANDLING.
Primary Sub-subtopic: Try-except-finally and exception types.
Question-bank grouping: Exception Handling.
Use this lecture for theory, examples, misconceptions, and short concept checks mapped to this concept ID.
Key things we'll cover
Try-except-finally and exception types
PYQ references used by both prompts4 included0 excluded
Flagged questions are excluded from both Study Notes and PPT references until corrected in Paper Analyzer.
Included
ID 6581 · 2023 · 1 mark(s)
State whether the following statement is True or False:
An exception may be raised even if the program is syntactically correct.
Exception Handling → Try-except-finally and exception types
Included
ID 6621 · 2024 · 1 mark(s)
State whether the following statement is True or False:
The finally block in Python is executed only if no exception occurs in the try block.
Exception Handling → Try-except-finally and exception types
Included
ID 6183 · 2025 · 1 mark(s)
Consider the statements given below and then choose the correct output from the given options:
N='5'
try:
print('WORD' + N, end='#')
except:
print('ERROR', end='#')
finally:
print('OVER')
(A) ERROR#
(B) WORD5#OVER
(C) WORD5#
(D) ERROR#OVER
Exception Handling → Try-except-finally and exception types
Included
ID 6669 · 2025 · 1 mark(s)
What will be the output of the following Python code?
try:
x = 10 / 0
except Exception:
print("Some other error!")
except ZeroDivisionError:
print("Division by zero error!")
a) Division by zero error!
b) Some other error!
c) ZeroDivisionError
d) Nothing is printed
Exception Handling → Try-except-finally and exception types