Running Total

Many programs need to calculate a running total to find the sum of a list of numbers or
to calculate the average.

Values are repeatedly input in a loop and are added to a running total each time round the loop.

The average can be found by dividing the final total by the number of items.

The algorithms must always set the value in the variable to 0 before the loop.

Python Code Example

Pseudocode Code Example