From b819976d5c02e75001993ff7afaaf5280fdf7f89 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Mi=C5=82osz=20Maliszewski?= Date: Wed, 13 Jun 2018 17:29:20 +0000 Subject: [PATCH] Zaktualizuj 'labs02/task02.py' --- labs02/task02.py | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/labs02/task02.py b/labs02/task02.py index a6d6321..2bcf28b 100644 --- a/labs02/task02.py +++ b/labs02/task02.py @@ -6,7 +6,12 @@ """ def days_in_year(days): - pass + if ((days % 4) == 0 and ((days % 100) != 0)) or ((days % 400) == 0): + dni=366 + else: + dni=365 + + return dni def tests(f): inputs = [[2015], [2012], [1900], [2400], [1977]]