Suppose we have N numbers(integers, floats, whatever you want) and want to find their arithmetic mean. Simplest method is to sum all values and divide by number of values:>
If you use float you might avoid big integers:
float
def simple_mean(array[N]): sum = 0.0 # <--- for i = 1 to N sum += array[i] return sum / N