EY interview question

For loop in python and a program