omega-rosetta
aien-dev/omega-rosetta
Brought by drakestapleton
omega-rosetta / tasks / leap-year / oracle.py
| 1 | # Independent reference for "Leap year" (Python 3, standard library only). |
| 2 | # expected.txt is this program's stdout; omc never produced it. |
| 3 | import calendar |
| 4 | for y in [1900, 1996, 2000, 2023, 2024, 2100, 2400]: |
| 5 | print(f"{y} is {'a' if calendar.isleap(y) else 'not a'} leap year") |