Program to check that given year is leap year or not

Year = int(input(“Enter Year”)

if (year % 400 == 0) and (year % 100 == 0):
print(“{0} is a leap year”.format(year))

elif (year % 4 ==0) and (year % 100 != 0):
print(“{0} is a leap year”.format(year))

else:
print(“{0} is not a leap year”.format(year))

3 Likes

Very nice, correct solution, Keep it up.

1 Like