input: Write a function to calculate the mean of numbers stored in an array. The function should return the mean value and if the array is empty, it should return 0.
  def calculate_mean(numbers):
      if not numbers:
          return 0
      total_sum = sum(numbers)
      mean = total_sum / len(numbers)
      return mean
  
  assert calculate_mean([10, 20, 30]) == 20.0
  assert calculate_mean([]) == 0
  assert calculate_mean([5, 15, 25]) == 15.0
  assert calculate_mean([100]) == 100.0
  assert calculate_mean([1, 2, 3, 4, 5]) == 3.0
output: def calculate_mean(numbers):
      if not numbers:
          return 0
      total_sum = sum(numbers)
      mean = total_sum / len(numbers)
      return mean