def leap_year():
    if(year%4==0):
        if(year%100==0):
            if(year%400==0):
                print('leap year')
            else:
                print(' not a leap year')
        else:
            print(' leap year')
    else:
         print(year,'is not a leap year')
year=int(input("enter a year:"))
leap_year()

Embed on website

To embed this project on your website, copy the following code and paste it into your website's HTML: