input: Write a function to calculate the mean of numbers stored in an array. If the array is empty, return 0.
  assert calculate_mean([10, 20, 30])==20.0
  assert calculate_mean([5, 15, 25, 35])==20.0
  assert calculate_mean([2, 4, 6, 8, 10])==6.0
  assert calculate_mean([])==0
output: def calculate_mean(arr):
      if not arr:
          return 0
      return sum(arr) / len(arr)