Problem a: suppose you have an array of n floats and you want to calculate an array of n running averages over three elements. The middle part would be straightforward: