Steps to handle type exception in python:
- Step 1: We will take inputs from the user, two numbers.
- Step 2: If the entered data is not integer, throw an exception.
- Step 3: If the remainder is 0, throw divide by zero exception.
- Step 4: If no exception is there, return the result.
Program to illustrate the type exception in python
Output:
need an explanation for this answer? contact us directly to get an explanation for this answer