QuestionQ82

VerifiedFunctions and Exceptions

What behavior is expected from the following program when the user enters 0?

Question Image

Explanation

Python’s input() function returns a string. Dividing the integer 10 by the string value "0" is not supported, so Python raises a TypeError.

Community Discussion

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