Python Program to check whether a given year is leap year














































Python Program to check whether a given year is leap year



Description:-

what is a leap year?

* A leap Year should be divided by 4

*Century years are not considered as leap Years

* But those century years which are divisible by 400 are considered as leap years.

Input Code 

year = int(input("enter any year: ")) if(year%4==0 and (year%100!=0 or year%400==0)): print(year,"is leap year") else: print(year,"is not leap year")

Output

enter any year: 2019
2019 is not a leap year 

Comments