This commit is contained in:
s45148 2017-11-19 15:42:50 +01:00
parent b932a8291e
commit a4151ff0a0

View File

@ -7,8 +7,15 @@ Jeśli podany argument jest mniejszy od 1 powinna być zwracana wartość 0.
"""
def sum_from_one_to_n(n):
pass
ResultList = []
for z in
if n <1:
ResultList.append(0)
else:
SumResult = 0
for i in range(n+1):
SumResult = SumResult + i
ResultList.append(SumResult)
def tests(f):
inputs = [[999], [-100]]