Exact Age, Including Leap Days

medium
Checkpoint challenge
Solve this to show you know the material and jump straight to Unit 19. Everything before it counts as cleared.

Implement age(birth, on) returning a person's age in completed years on date on (both ISO strings). People born on 29 February have their birthday on 1 March in non-leap years.

Also implement next_birthday(birth, on) returning the ISO date of their next birthday strictly after on, using the same rule.

#datetime#edge-cases2 visible + 1 hidden tests
solution.py · Python 3.13
Loading editor…
Run your code to see results. ⌘↵ to run · ⌘⇧↵ to submit
Exact Age, Including Leap Days · TechGradify