The Python Papers

The Python Papers

Python Pop Quiz 1 - Exceptionally Crazy

Mike Driscoll's avatar
Mike Driscoll
Oct 22, 2025
∙ Paid

What will be the output if you run this code?

A) Outer ZeroDivisionError exception caught

B) Error: You divided by zero!

C) Error: You divided by zero! Finally executed

D) Finally executed

E) None of the above

This tutorial is an excerpt from my book, The Python Quiz Book

The Answer

D) Finally executed

Explanation

This code causes the ZeroDivisionError to be …

User's avatar

Continue reading this post for free, courtesy of Mike Driscoll.

Or purchase a paid subscription.
© 2026 Mike Driscoll · Privacy ∙ Terms ∙ Collection notice
Start your SubstackGet the app
Substack is the home for great culture