Python Program to check given year is leap year or not?
In this we are going to check given year is leap year or not. Generally Leap years are comes every 4 years from starting. Leap year contains 366 days (365+1) . We define a leapyear is divisible by 4 then leap year.
Input:
2000
Output:
Leap year
Explanation:
2000%4 = 0 then it is leap year
Code:
year=int(input())
if(year%400):
print("Leap year")
elif(year%100):
print("Not a Leap year")
elif(year%4==0):
print("Leap year")
else:
print("Not a Leap year")
Note:
Hello Guys, Don't Stop Learning keep Going..............