# a year is leap year if it is evenly divisble by 4
# a year is leap year if it is evenly divisible by 4 but may not by 100
# a year is leap year if it is evenly divisible by 4, by 100 as well as by 400
print("Welcome to Leap Year Finder!")
while True:
year = int(input("Plz enter the year: "))
if year % 4 == 0:
if year % 100 == 0:
if year % 400 == 0:
print(f"{year} is a Leap Year.")
else:
print(f"{year} is not a Leap Year.")
else:
print(f"{year} is a Leap Year.")
else:
print(f"{year} is not a Leap Year.")
Comments
Post a Comment
Write something to CodeWithAbdur!