Infosys Interview Question

Combination of error handling in python