input: Write a function to calculate the mean of numbers stored in an array. The function should return the average of the numbers. If the array is empty, the function should return 0.
  def calculate_mean(numbers):
      if len(numbers) == 0:
          return 0
      total_sum = 0
      for num in numbers:
          total_sum += num
      mean = total_sum / len(numbers)
      return mean
  
  assert calculate_mean([10, 20, 30]) == 20.0
  assert calculate_mean([0, 0, 0]) == 0.0
  assert calculate_mean([5, 15, 25, 35, 45]) == 25.0
  assert calculate_mean([-10, -20, -30]) == -20.0
  assert calculate_mean([]) == 0
output: def calculate_mean(numbers):
      if len(numbers) == 0:
          return 0
      total_sum = 0
      for num in numbers:
          total_sum += num
      mean = total_sum / len(numbers)
      return mean