ALTEN interview question

1. python coding std , simple logic code in python