input: Write a function to predict the next day's forecasted temperature using the exponential smoothing algorithm given the past three day's forecasted temperatures. If the input list is less than three days, the function should return None.
  
  def predict_temperature(temperature_list):
      if len(temperature_list) < 3:
          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]) == 20.5
  assert predict_temperature([19, 21, 20]) == 20.25
  assert predict_temperature([18, 20, 22]) == 21.5
  assert predict_temperature([20]) == None
  assert predict_temperature([]) == None
output: def predict_temperature(temperature_list):
      if len(temperature_list) < 3:
          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