Python · Numerical problems for engineers

Averages that keep running

A thermostat shows the average so far after every reading, and two more lines of a loop tell you how much the readings spread.