input: Write a python function to calculate the mean of an array.
  assert mean([2, 4, 5, 7]) == 4.5
  assert mean([1, 2, 3]) == 2
  assert mean([10, 20, 30, 40, 50]) == 30
output: def mean(arr):
      return sum(arr) / len(arr)