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 three past temperatures and return the predicted temperature for the next day. If the input list does not contain exactly three temperatures, 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]) == 21
  assert predict_temperature([10, 15, 12]) == 13.0
  assert predict_temperature([18, 20, 19]) == 19.5
  assert predict_temperature([1, 2, 3]) == 2.5
  assert predict_temperature([]) == None
output: 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