input: Write a function to find the average of numbers stored in an array. If the given array is empty then return 0.
  assert calculate_mean([10, 20, 30])==20.0
  assert calculate_mean([5, 5, 5, 5])==5.0
  assert calculate_mean([1, 2, 3, 4, 5])==3.0
  assert calculate_mean([100, 200, 300])==200.0
  assert calculate_mean([])==0
  
  def calculate_mean(numbers):
      if not numbers:
          return 0
      total_sum = sum(numbers)
      mean = total_sum / len(numbers)
      return mean
output: def calculate_mean(numbers):
      if not numbers:
          return 0
      total_sum = sum(numbers)
      mean = total_sum / len(numbers)
      return mean