input: Write a function to predict the next day's forecast temperature using the exponential smoothing algorithm based on the past three days' forecast temperatures. Use an alpha value of 0.5. If the given 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.5
  assert predict_temperature([20, 23, 24]) == 23.5
  assert predict_temperature([19, 20, 22]) == 21.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