diff --git a/labs02/task01.py b/labs02/task01.py index 7c08c56..ee754f9 100644 --- a/labs02/task01.py +++ b/labs02/task01.py @@ -7,7 +7,7 @@ która zawiera tylko elementy z list o parzystych indeksach. """ def even_elements(lista): - pass + return lista[::2] def tests(f): diff --git a/labs02/task02.py b/labs02/task02.py index a6d6321..98a38eb 100644 --- a/labs02/task02.py +++ b/labs02/task02.py @@ -6,7 +6,10 @@ """ def days_in_year(days): - pass + if ((days % 4 == 0) and (days % 100 != 0)) or (days % 400 == 0): + return 366 + else: + return 365 def tests(f): inputs = [[2015], [2012], [1900], [2400], [1977]] diff --git a/labs02/test_task.py b/labs02/test_task.py index 5879768..c1a756c 100755 --- a/labs02/test_task.py +++ b/labs02/test_task.py @@ -3,10 +3,7 @@ def suma(a, b): - """ - Napisz funkcję, która zwraca sumę elementów. - """ - pass + return a + b def tests(f): inputs = [(2, 3), (0, 0), (1, 1)]