Python Program to Check Leap Year
A leap year is a year which has 366 days. The extra day is the 29th February. There is a leap year every four years.
⇒Python :- Control Statement in hindi
Program year= int(input("enter 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)) Output enter year = 2000 2000 is a leap year enter year = 1800 1800 is not a leap year
⇒Python : WAP to print factorial of any number
⇒Python : WAP to to Print the Fibonacci sequence