Nested If Example Program In Python Using Loop