input: Write a python function to calculate the moving average of a list of numbers.
  assert moving_average([1, 2, 3, 4, 5, 6, 7, 8, 9], 3) == [2.0, 3.0, 4.0, 5.0, 6.0, 7.0, 8.0]
  assert moving_average([10, 20, 30, 40, 50], 2) == [15.0, 25.0, 35.0, 45.0]
  assert moving_average([3, 6, 9, 12], 1) == [3.0, 6.0, 9.0, 12.0]
output: def moving_average(numbers, window_size):
      if window_size <= 0:
          raise ValueError("Window size must be positive")
      
      moving_averages = []
      for i in range(len(numbers) - window_size + 1):
          window = numbers[i:i + window_size]
          window_average = sum(window) / window_size
          moving_averages.append(window_average)
      
      return moving_averages