Jul-02-2020, 12:04 PM
(This post was last modified: Jul-02-2020, 12:04 PM by spalisetty06.)
Hello,
I am facing an issue when I use Years' like 100, 1000. I am not sure, why is this happening.
I am facing an issue when I use Years' like 100, 1000. I am not sure, why is this happening.
print("***********Leap Year**************") Year = int(input("Please enter an year to see if it is a Lear Year ")) print("Year entered is ", Year) while Year!=0: if(Year % 4 == 0): if(Year % 100 !=0 or Year % 400 == 0): print(f'{Year} is a Leap Year') Year = int(input("Please enter an year to see if it is a Lear Year ")) print(Year) else: print("Not a Leap Year") Year = int(input("Please enter an year to see if it is a Lear Year ")) print(Year)
Output:Please enter an year to see if it is a Lear Year 400
Year entered is 400
400 is a Leap Year
Please enter an year to see if it is a Lear Year 100
100
Process finished with exit code -1