1
0
forked from tdwojak/Python2017

commited tasks

This commit is contained in:
s45150 2017-11-19 15:15:35 +01:00
parent 933e36a688
commit fa0b6aa45a
2 changed files with 6 additions and 3 deletions

View File

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

View File

@ -6,7 +6,7 @@ def suma(a, b):
""" """
Napisz funkcję, która zwraca sumę elementów. Napisz funkcję, która zwraca sumę elementów.
""" """
pass return a + b
def tests(f): def tests(f):
inputs = [(2, 3), (0, 0), (1, 1)] inputs = [(2, 3), (0, 0), (1, 1)]