Decisions · routine
Leap year
Write is_leap(year) returning True or False.
A year is a leap year if it divides by 4 — except years that divide by 100, which are not — except years that divide by 400, which are.
- right answers
- arguments left as they should be
Run adds print(is_leap(1900)) after your code, to try it.
Stuck on the idea rather than the code? The Making decisions lesson walks through it.