Python Program

Object:- Python Program to Check Leap Year

year = int(input("enter a year: "))

if(year%4==0 and (year%100!=0 or year%400==0)):
    print("leap year")
else:
    print("not leap year")

Output

enter a year: 2018
not leap year

Explanation

A leap year is exactly divisible by 4 except for century years (years ending with 00).