Comment on Calculating the mean of a list of numbers (2016)parentComments−rwz7yThat produces an unavoidable special case when the number of elements in the list is a prime number.−bhl7yJust pad the end of the list with 0s, but keep the original size of the list.
Comments
That produces an unavoidable special case when the number of elements in the list is a prime number.
Just pad the end of the list with 0s, but keep the original size of the list.