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. The function should return the predicted temperature. If the input list is empty, the function should return None.
  def predict_temperature(temperature_list):
      if not temperature_list:
          return None
      alpha = 0.5 # Confidence value
      predicted_temperature = temperature_list[-1] # Initializing prediction
      for temperature in temperature_list[:-1]:
          predicted_temperature = alpha * temperature + (1-alpha) * predicted_temperature
      return predicted_temperature
  
  assert predict_temperature([21, 22, 20]) == 21
  assert predict_temperature([20, 20, 20]) == 20
  assert predict_temperature([10, 15, 20]) == 17.5
  assert predict_temperature([]) == None
  assert predict_temperature([30, 32, 28]) == 29
output: def predict_temperature(temperature_list):
      if not temperature_list:
          return None
      alpha = 0.5 # Confidence value
      predicted_temperature = temperature_list[-1] # Initializing prediction
      for temperature in temperature_list[:-1]:
          predicted_temperature = alpha * temperature + (1-alpha) * predicted_temperature
      return predicted_temperature