TEKsystems Interview Question

Some programs to solve in python