# Title: Leap year check
# Heading: Python Program to Check a Leap Year
# Level: beginner
# Tags: leap year, calendar, divisibility, february 29
# About: Checks whether a year is a leap year: divisible by 4, except century years, which must be divisible by 400.

def is_leap_year(year):
    """True if year is a leap year in the Gregorian calendar."""
    if year % 400 == 0:
        return True
    if year % 100 == 0:
        return False
    return year % 4 == 0


print("2024:", is_leap_year(2024))
print("1900:", is_leap_year(1900))
print("2000:", is_leap_year(2000))
