input: def exponential_series(x: float, n: int) -> float:
      """ Calculates the sum of the exponential series from 0 to n for a given x.
      >>> exponential_series(2.0, 3)
      15.0
      >>> exponential_series(1.0, 5)
      6.0
      """
      sum = 0
      for i in range(n+1):
          sum += x ** i
      return sum
output:     sum = 0
      for i in range(n+1):
          sum += x ** i
      return sum