Infogain Interview Question

Easy python question regarding loop + if else condition