forked from tdwojak/Python2017
update test task
Signed-off-by: s45167 <krzysztof.spalinski@op.pl>
This commit is contained in:
parent
03072b0fff
commit
a4c07e0d39
@ -7,7 +7,17 @@ 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
|
xN=range(1,n+1)
|
||||||
|
xSum = 0
|
||||||
|
if n<1:
|
||||||
|
xSum=0
|
||||||
|
else:
|
||||||
|
for i in xN:
|
||||||
|
xSum += i
|
||||||
|
|
||||||
|
return xSum
|
||||||
|
|
||||||
|
#pass
|
||||||
|
|
||||||
|
|
||||||
def tests(f):
|
def tests(f):
|
||||||
|
Loading…
Reference in New Issue
Block a user