input: Write a function to calculate the mean of numbers stored in an array. The function should take a list of numbers as input and return their average. If the input array is empty, return 0.
  assert calculate_mean([10, 20, 30])==20.0
  assert calculate_mean([15, 25, 35, 45])==30.0
  assert calculate_mean([5, 10, 15])==10.0
  assert calculate_mean([0, 0])==0.0
  assert calculate_mean([])==0
output: def calculate_mean(numbers):
      if not numbers:
          return 0
      return sum(numbers) / len(numbers)