input: Write a function to predict the next day's forecasted temperature using the exponential smoothing algorithm, given the past three days' forecasted temperatures. The function should take a list of three temperatures as input and return the predicted temperature.
  
  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]) == 21.0
  assert predict_temperature([15, 17, 16]) == 16.0
  assert predict_temperature([28, 30, 29]) == 29.0
  assert predict_temperature([10, 12, 11]) == 11.0
  assert predict_temperature([25, 27, 26]) == 26.0
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