def check_leap_year(year):
if (year % 4 == 0 and year % 100 != 0) or (year % 400 == 0):
return True
else:
return False
# Example usage:
year = int(input("Enter a year to check if it's leap or not: "))
if check_leap_year(year):
print(f"{year} is a leap year.")
else:
print(f"{year} is not a leap year.")
To embed this project on your website, copy the following code and paste it into your website's HTML: