forked from tdwojak/Python2017
Resolved
This commit is contained in:
parent
87b7b6d675
commit
b195295736
@ -7,7 +7,13 @@ Jeśli podany argument jest mniejszy od 1 powinna być zwracana wartość 0.
|
|||||||
"""
|
"""
|
||||||
|
|
||||||
def sum_from_one_to_n(n):
|
def sum_from_one_to_n(n):
|
||||||
pass
|
results=0
|
||||||
|
if n<1:
|
||||||
|
return results
|
||||||
|
else:
|
||||||
|
for i in range(n+1):
|
||||||
|
results+=i
|
||||||
|
return results
|
||||||
|
|
||||||
|
|
||||||
def tests(f):
|
def tests(f):
|
||||||
|
Loading…
Reference in New Issue
Block a user