From e6e3ee8e3539af4a8e950a5efb6a669ce9fb67ac Mon Sep 17 00:00:00 2001 From: s45148 Date: Tue, 28 Nov 2017 22:08:42 +0100 Subject: [PATCH] z1, z2, z3, z4, z5, z6, z7, z8 --- labs02/task08.py | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/labs02/task08.py b/labs02/task08.py index 252b10d..f0e1e6e 100644 --- a/labs02/task08.py +++ b/labs02/task08.py @@ -7,7 +7,11 @@ przez 3 lub 5 mniejszych niż n. """ def sum_div35(n): - pass + res = 0 + for i in range(n): + if i % 3 == 0 or i % 5 == 0: + res += i + return res def tests(f): inputs = [[10], [100], [3845]]