From c941f0f6ac475a47e062feb86c28fa1753378c73 Mon Sep 17 00:00:00 2001 From: s45147 Date: Mon, 20 Nov 2017 09:43:00 +0100 Subject: [PATCH] done --- labs02/task08.py | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/labs02/task08.py b/labs02/task08.py index 252b10d..0100ab5 100644 --- a/labs02/task08.py +++ b/labs02/task08.py @@ -7,7 +7,12 @@ przez 3 lub 5 mniejszych niż n. """ def sum_div35(n): - pass + suma = 0 + for i in range(n): + if (i+1) < n and (i+1)%3 == 0 and (i+1)%5 == 0: + suma += (i+1) + + return suma def tests(f): inputs = [[10], [100], [3845]]