forked from tdwojak/Python2017
done
This commit is contained in:
parent
fd2448691d
commit
384abbe074
@ -5,8 +5,11 @@
|
||||
Napisz funkcję days_in_year zwracającą liczbę dni w roku (365 albo 366).
|
||||
"""
|
||||
|
||||
def days_in_year(days):
|
||||
pass
|
||||
def days_in_year(years):
|
||||
if (years % 4 == 0 and years % 100 != 0) or years % 400 == 0:
|
||||
return 366
|
||||
else:
|
||||
return 365
|
||||
|
||||
def tests(f):
|
||||
inputs = [[2015], [2012], [1900], [2400], [1977]]
|
||||
|
Loading…
Reference in New Issue
Block a user