Skip to content

Instantly share code, notes, and snippets.

@tatamiya
Last active April 6, 2019 06:45
Show Gist options
  • Save tatamiya/51db39f048f44810ccc03c854cc228a7 to your computer and use it in GitHub Desktop.
Save tatamiya/51db39f048f44810ccc03c854cc228a7 to your computer and use it in GitHub Desktop.
def sum_from_one(k):
sum = 0
for i in range(1, k+1):
sum += i
return sum
sum_list = []
for i in range(0, N):
sum_list.append(sum_from_one(i))
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment