Guest User

Untitled

a guest
May 22nd, 2018
69
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.29 KB | None | 0 0
  1. def cumulative_sum(number_list):
  2. # number_list is a list of numbers
  3. empty_list=[]
  4. i=0
  5. total = 0
  6. for i <= len(number_list):
  7. total= number_list[i]
  8. empty_list.append[total]
  9. i = i+1
  10. total = total + number_list[i]
  11. return empty_list
Add Comment
Please, Sign In to add comment