year = int(input(“Enter a year: “))

if (year % 4) == 0:

if (year % 100) == 0:

if (year % 400) == 0:

print(year,”is a leap year”)

else:

print(year,”is not a leap year”)

else:

print(year,”is a leap year”)

else:

print(year,”is not a leap year”)

from datetime import date

y = int(input(“enter a year”))

if y % 4 == 0:

if y % 100 == 0:

if y % 400 == 0:

print(“leap year”)

else:

print(“not a leap year”)

else:

print(“leap year”)

else:

print(“not a leap year”)

year=int(input(“Enter year to be checked:”))

if(year%4==0 and year%100!=0 or year%400==0):

print(“The year is a leap year!”)

else:

print(“The year isn’t a leap year!”)

def is_leap(year):

leap = False

Tomy

Tomy is a contributor at AskMeCode. We are committed to providing well-researched, accurate, and valuable content to our readers.

You May Also Like

Artistic representation for Business Development Manager - Sonar Piezoceramics, Sensors, and Transducers

Business Development Manager - Sonar Piezoceramics, Sensors, and Transducers

Apply for Business Development Manager Position The Amphenol Corporation is seeking a highly skilled Business Development Manager to lead the...

GitHub Image Optimization with VSCode Git

GitHub Image Optimization with VSCode Git

GitHub Image Optimization with VSCode Git A blog around performance. by Thierry Passeron Introduction I write a lot about performance...

Artistic representation for Tools support automotive RISC V virtual prototype

Tools support automotive RISC V virtual prototype

The demonstrator is designed to showcase the potential of RISC-V in automotive applications. Key Features of the Demonstrator The automotive...

Artistic representation for Thoughtworks report highlights generative AI influence trends

Thoughtworks report highlights generative AI influence trends

Key Trends in Software Development and Delivery The 32nd edition of Thoughtworks' Technology Radar report highlights several key trends in...

Leave a Reply

About | Contact | Privacy Policy | Terms of Service | Disclaimer | Cookie Policy
© 2026 AskMeCode. All rights reserved.