Combining conditions
Read · 1 of 3
Real rules combine checks
A year is a leap year if it divides by 4, except years that divide by 100, unless they also divide by 400.
In Python: (year % 4 == 0 and year % 100 != 0) or year % 400 == 0.
Read · 1 of 3
A year is a leap year if it divides by 4, except years that divide by 100, unless they also divide by 400.
In Python: (year % 4 == 0 and year % 100 != 0) or year % 400 == 0.