QuestionQ105

VerifiedFunctions and Exceptions

What is the output of the following code when the user enters 0?

Question Image

Explanation

Converting "0" with int() succeeds, but dividing zero by zero raises ZeroDivisionError. The corresponding except ZeroDivisionError clause runs and prints Very bad input....

Learn more

Community Discussion

No comments yet. Be the first to start the discussion!