Program to check its leap year or not

year = int(input("Enter a year: "))
if (year % 4) == 0:
if (year % 100) == 0:
if (year % 400) == 0:
print({0} “is a leap year”.format(year))
else:
print(“{0} is not a leap year”.format(year))
else:
print(“{0} is a leap year”.format(year))
else:
print(“{0} is not a leap year”.format(year))

1 Like

year= eval(input())
if year % 4==0 and year % 400==0 & year %100 == 0 :
print (year,“Is leap year”)
else:
print(year,“Is not leap year”)

2 Likes

very nice, keep it up.

very nice, keep it up,

year=int(input(“Enter a year:”))
if(year%4==0 and year%100!=0 or year%400==0):
print(“{} is a leap year”.format(year))
else:
print(“{} isnt a leap year”.format(year))

1 Like

Very nice @nareshkumarshivarath , Keep it up.

1 Like