Skip to content

Total Sum

Andrew Burke edited this page Apr 3, 2024 · 7 revisions

def sum_positive_range(stop):

total = 0

for num in range(1, stop + 1):

total += num

return total

Clone this wiki locally