Write different types of exception in
python?
Ans.-
Common Exceptions:
1.)
ZeroDivisionError:
Occurs when a number is divided by zero.
2.)
NameError:
It occurs when a name is not found .It may be local or global.
3.)
IndentationError:
If incorrect indentation is given.
4.)
IOError:
It occurs when input output operation fails.
EOFError: It occurs when the end of the file is
reached, and yet operation is being performed