1
0
forked from tdwojak/Python2017
This commit is contained in:
s45152 2017-11-19 15:31:48 +01:00
parent 65761595b2
commit 47ba5d1051

View File

@ -5,8 +5,12 @@
Napisz funkcję days_in_year zwracającą liczbę dni w roku (365 albo 366).
"""
def days_in_year(days):
pass
def days_in_year(year):
if(year % 4 == 0 and year % 100 != 0) or year % 400 == 0:
return 366
else:
return 365
def tests(f):
inputs = [[2015], [2012], [1900], [2400], [1977]]