Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- def cumulative_sum(number_list):
- # number_list is a list of numbers
- empty_list=[]
- i=0
- total = 0
- for i <= len(number_list):
- total= number_list[i]
- empty_list.append[total]
- i = i+1
- total = total + number_list[i]
- return empty_list
Add Comment
Please, Sign In to add comment