forked from tdwojak/Python2017
z1, z2, z3
This commit is contained in:
parent
740202ea3f
commit
72eb9d01e2
@ -9,12 +9,14 @@ Jeśli podany argument jest mniejszy od 1 powinna być zwracana wartość 0.
|
||||
def sum_from_one_to_n(n):
|
||||
ResultList = []
|
||||
if n <1:
|
||||
ResultList.append(0)
|
||||
#ResultList.append(0)
|
||||
SumResult = 0
|
||||
else:
|
||||
SumResult = 0
|
||||
for i in range(n+1):
|
||||
SumResult = SumResult + i
|
||||
ResultList.append(SumResult)
|
||||
#ResultList.append(SumResult)
|
||||
return SumResult
|
||||
|
||||
def tests(f):
|
||||
inputs = [[999], [-100]]
|
||||
|
Loading…
Reference in New Issue
Block a user