input: Write a function to calculate the mean of numbers stored in an array. The function should take a single list of numbers as input and return the average of those numbers. If the list is empty, it 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([5, 15, 25, 35])==20.0
  assert calculate_mean([])==0
  assert calculate_mean([1])==1.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