input: Write a function to implement the exponential smoothing algorithm to predict the next day's forecast temperature given the past three day's forecast temperatures. The function should take a list of past three temperatures as input and return the predicted temperature for the next day.
  
  def predict_temperature(temperature_list):
      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]) == 20.75
  assert predict_temperature([24, 25, 23]) == 23.75
  assert predict_temperature([15, 16, 14]) == 14.5
  assert predict_temperature([28, 27, 29]) == 27.75
output: def predict_temperature(temperature_list):
      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