1
0
forked from tdwojak/Python2017

Update 'labs02/task08.py'

This commit is contained in:
s45164 2017-12-01 17:19:34 +00:00
parent d17a0deeed
commit dda70b0c8d

View File

@ -7,8 +7,16 @@ przez 3 lub 5 mniejszych niż n.
""" """
def sum_div35(n): def sum_div35(n):
s=0
i=0
while i<n:
if (i%3==0) or (i%5==0):
s=s+i
i=i+1
return s
pass pass
def tests(f): def tests(f):
inputs = [[10], [100], [3845]] inputs = [[10], [100], [3845]]
outputs = [23, 2318, 3446403] outputs = [23, 2318, 3446403]