From c9b8a28f10fc899ac0fa1597f71c5a4db05718dc Mon Sep 17 00:00:00 2001 From: Ewelina Date: Sun, 26 Nov 2017 19:31:21 +0100 Subject: [PATCH] task01 and task02 passed --- labs02/task01.py | 3 +-- labs02/task02.py | 5 ++++- 2 files changed, 5 insertions(+), 3 deletions(-) diff --git a/labs02/task01.py b/labs02/task01.py index 7c08c56..f579b82 100644 --- a/labs02/task01.py +++ b/labs02/task01.py @@ -7,8 +7,7 @@ która zawiera tylko elementy z list o parzystych indeksach. """ def even_elements(lista): - pass - + return(lista[::2]) def tests(f): inputs = [[[1, 2, 3, 4, 5, 6]], [[]], [[41]]] diff --git a/labs02/task02.py b/labs02/task02.py index a6d6321..1ca1f4e 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]]