input: Write a function to compute the moving average of a time-series data set. The function should take as parameters the list of data points and the window size, and return a list containing the moving average for each point in the original data set. 
  
  def moving_average(data_points, window):
      moving_average = []
      for index in range(len(data_points)):
          start = 0 if index-window+1 < 0 else index-window+1
          window_data = data_points[start:index+1]
          average = sum(window_data)/len(window_data)
          moving_average.append(average)
  
      return moving_average
  
  assert moving_average([3, 5, 7, 2, 8, 10, 11, 65, 72, 81, 99, 100, 150], 3) == [3.0, 4.0, 5.0, 4.333333333333333, 5.666666666666667, 6.666666666666667, 7.666666666666667, 25.333333333333332, 49.0, 72.66666666666667, 84.33333333333333, 93.33333333333333, 116.33333333333333]
  assert moving_average([3, 5, 7, 2, 8, 10, 11, 65, 72, 81, 99, 100, 150], 5) == [3.0, 4.0, 5.0, 4.75, 5.0, 5.4, 6.6, 18.6, 31.4, 47.2, 71.4, 89.0, 106.4]
  assert moving_average([], 3) == []
output: def moving_average(data_points, window):
      moving_average = []
      for index in range(len(data_points)):
          start = 0 if index-window+1 < 0 else index-window+1
          window_data = data_points[start:index+1]
          average = sum(window_data)/len(window_data)
          moving_average.append(average)
  
      return moving_average