1. Home
  2. /
  3. Blog
  4. /
  5. Python Program to Check Leap Year
Python

Python Program to Check Leap Year

September 27, 2022 1 min read 2,276
Python Program to Check Leap Year
year = int(input("enter the 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))
Share:
Read next

Related articles