Program to check if a year is a leap year

# Check Leap Year
year = int(input("Enter a year: "))

if (year % 4 == 0) and (year % 100 != 0) or (year % 400 == 0):
    print(year, "is a leap year")
else:
    print(year, "is not a leap year")
Output:
Enter a year: 2024
2024 is a leap year

Leave a Reply

Your email address will not be published. Required fields are marked *