Site icon Matistics

Python – program to check if the input year is a LEAP year or not

x=int(input("Enter a year"))
if(x%4==0):
if(x%100!=0):
print("Leap year")
elif(x%400==0):
print("Leap Year")
else:
print("Not a Leap year")
else:
print("Not a leap year")
<code data-enlighter-language="python" class="EnlighterJSRAW">
Exit mobile version