IBM Interview Question

python coding