input: from typing import List
  
  
  def calculate_exponential_series(x: float, n: int) -> float:
      """ Calculate the sum of the series 1 + x + x^2 + x^3 + ... + x^n.
      >>> calculate_exponential_series(2, 3)
      15.0
      >>> calculate_exponential_series(5, 0)
      1.0
      >>> calculate_exponential_series(1.5, 4)
      7.1875
      """
output:     result = 1.0
      term = 1.0
      for i in range(1, n + 1):
          term *= x
          result += term
      return result