I implemented the exception in divide function, its purpose is to trap divide by zero exceptions and other exceptions such as TypeError.