forked from tdwojak/Python2018
zrobiono zadanie 8
This commit is contained in:
parent
05f21a640c
commit
513808064f
@ -7,7 +7,12 @@ przez 3 lub 5 mniejszych niż n.
|
||||
"""
|
||||
|
||||
def sum_div35(n):
|
||||
pass
|
||||
suma = 0
|
||||
for liczba in range(n):
|
||||
if (liczba % 3 == 0) or (liczba % 5 == 0):
|
||||
suma = suma + liczba
|
||||
|
||||
return suma
|
||||
|
||||
def tests(f):
|
||||
inputs = [[10], [100], [3845]]
|
||||
@ -22,3 +27,5 @@ def tests(f):
|
||||
if __name__ == "__main__":
|
||||
print(tests(sum_div35))
|
||||
|
||||
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user