From 50e576e7d998f4ebef57409675aaa6f257b47e15 Mon Sep 17 00:00:00 2001 From: s45164 Date: Fri, 1 Dec 2017 17:10:54 +0000 Subject: [PATCH] Update 'labs02/task02.py' --- labs02/task02.py | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/labs02/task02.py b/labs02/task02.py index a6d6321..c120678 100644 --- a/labs02/task02.py +++ b/labs02/task02.py @@ -6,8 +6,12 @@ """ def days_in_year(days): + if (days%4==0 and days%100!=0) or days%400==0: + return 366 + else: + return 365 pass - + def tests(f): inputs = [[2015], [2012], [1900], [2400], [1977]] outputs = [365, 366, 365, 366, 365]