Basic running total
Input
compute_running_total([1, 2, 3])
Output
[1, 3, 6]
The running totals are 1, 1+2=3, 1+2+3=6.
Full lesson preview
Practice accumulating values across a list to produce running totals.
Problem statement
Task
Examples
Input
compute_running_total([1, 2, 3])
Output
[1, 3, 6]
The running totals are 1, 1+2=3, 1+2+3=6.
Input format
Output format
Constraints
Samples
Input
compute_running_total([5, -2, 7])
Output
[5, 3, 10]
Running totals: 5, 5+(-2)=3, 3+7=10.