forked from tdwojak/Python2018
Zaktualizuj 'labs02/task08.py'
This commit is contained in:
parent
472fbffb25
commit
cc509761d9
@ -7,7 +7,13 @@ przez 3 lub 5 mniejszych niż n.
|
|||||||
"""
|
"""
|
||||||
|
|
||||||
def sum_div35(n):
|
def sum_div35(n):
|
||||||
pass
|
suma = 0
|
||||||
|
for i in range(n-1):
|
||||||
|
if (i%3==0) or (i%5==0):
|
||||||
|
suma = suma + i
|
||||||
|
|
||||||
|
return suma
|
||||||
|
|
||||||
|
|
||||||
def tests(f):
|
def tests(f):
|
||||||
inputs = [[10], [100], [3845]]
|
inputs = [[10], [100], [3845]]
|
||||||
@ -21,4 +27,3 @@ def tests(f):
|
|||||||
|
|
||||||
if __name__ == "__main__":
|
if __name__ == "__main__":
|
||||||
print(tests(sum_div35))
|
print(tests(sum_div35))
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user