Leap years
Write is_leap(year). A year is a leap year if it is divisible by 4, except centuries, which are leap years only when divisible by 400. So 2000 and 2024 are leap years; 1900 and 2023 are not.
Exercise
3 checksLeap years
def is_leap(year):
...
for y in [1900, 2000, 2023, 2024]:
print(y, is_leap(y))
Press Run to try your code, then Check answer to grade it.