Simple Nested If Program In Python Using Loop