Skip to content

Sum of 1 to 10

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

def sum_ten():

total = 0

for i in range(1, 11):

total += i

return total

output = sum_ten() # Output: 55

Clone this wiki locally