input: Write a function to predict the next day's forecast temperature using the exponential smoothing algorithm given the past three days' forecast temperatures. The function should have an optional parameter alpha to set the confidence value, defaulting to 0.5. If the given list of temperatures is empty, the function should return None.
  
  assert predict_temperature([21, 22, 20])==21.0
  assert predict_temperature([20, 23, 21])==21.5
  assert predict_temperature([19, 24, 21])==22.25
  assert predict_temperature([])==None
output: def predict_temperature(temperatures, alpha=0.5):
      if not temperatures:
          return None
      return alpha * temperatures[-1] + (1 - alpha) * (alpha * temperatures[-2] + (1 - alpha) * temperatures[-3])