Python: leap

This commit is contained in:
Dmitry Kokorin 2021-06-28 17:46:14 +03:00
parent 2ef852f257
commit 77b3a6a689
4 changed files with 112 additions and 0 deletions

2
python/leap/leap.py Normal file
View file

@ -0,0 +1,2 @@
def leap_year(year):
return (0 == year % 4 and 0 != year % 100 ) or (0 == year % 400)