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 …

Keep reading with a 7-day free trial

Subscribe to The Python Papers to keep reading this post and get 7 days of free access to the full post archives.

Already a paid subscriber? Sign in
© 2025 Mike Driscoll · Privacy ∙ Terms ∙ Collection notice
Start your SubstackGet the app
Substack is the home for great culture