Cognizant Interview Question

Program for exception handling using function in python