input: Write a function to predict the next day's forecast temperature using the exponential smoothing algorithm, given the past three day's forecast temperatures. Use a confidence value (alpha) of 0.5. If the input list is empty, return None.
  
  def predict_temperature(temperature_list):
      if not temperature_list:
          return None
      alpha = 0.5
      predicted_temperature = temperature_list[-1]
      for temperature in temperature_list[:-1]:
          predicted_temperature = alpha * temperature + (1 - alpha) * predicted_temperature
      return predicted_temperature
  
  assert predict_temperature([21, 22, 20]) == 21.0
  assert predict_temperature([20, 21, 22]) == 21.5
  assert predict_temperature([23, 24, 22]) == 22.5
  assert predict_temperature([25, 26, 27]) == 26.5
  assert predict_temperature([]) == None
output: def predict_temperature(temperature_list):
      if not temperature_list:
          return None
      alpha = 0.5
      predicted_temperature = temperature_list[-1]
      for temperature in temperature_list[:-1]:
          predicted_temperature = alpha * temperature + (1 - alpha) * predicted_temperature
      return predicted_temperature