FunctionRacerProblemsRace

Running Total

BeginnerNumPyPython

sales[i] is the money earned on day i. Return a list where item i is the total earned from day 0 up to and including day i. Hint: np.cumsum.

Example 1

sales [3,1,4,1]
returns [3,4,8,9]

The totals are 3, 4, 8, 9.

Constraints

Race itor take your time

Write it in your browser, against the clock. The model solution, stepped through line by line, comes after.

More NumPy problems