Infosys Interview Question

Oops , and some python concepts