def is_leap_year(year):
# If year is divisible by 4
if year % 4 == 0:
# If year is also divisible by 100
if year % 100 == 0:
# If year is divisible by 400, it's a leap year
if year % 400 == 0:
return True
# Divisible by 100 but not by 400, not a leap year
else:
return False
# Divisible by 4 but not by 100, it's a leap year
else:
return True
# Not divisible by 4, not a leap year
else:
return False
# Input from the user
year = int(input("Enter a year: "))
# Check if the year is a leap year
if is_leap_year(year):
print(f"{year} is a leap year.")
else:
print(f"{year} is not a leap year.")