A balance after every transaction
A bank statement doesn't just show your spending. Next to each transaction it shows your balance at that moment: the total of everything so far.
That's a running total. Walk through the array, keep adding each value to a total, and after every addition write the total down in a new list. You'll use this idea a lot later, for answering "what's the total between day 3 and day 7?" in one step.
Add, then write it down: one total per box.
The total so far
2
04
11
23
3i
total = 2. result = [2]
Move 1 of 4
Add first, then record
Inside the loop, order matters. Add the current value to the total first, and only then write the total down.
Do it the other way round and every entry is one step behind: the first entry is 0, and the last value never gets counted. For 2, 4, 1 you want 2, 6, 7, not 0, 2, 6.
Record first? every entry is one step behind.
total = 0
result = []
for x in nums:
total += x
result.append(total)
return result