input: 
  def exponential_series(x: float, n: int) -> float:
      """ Calculate the exponential series for a given x and n. The series is
      defined as the sum of the powers of x from 0 to n.
      >>> exponential_series(1, 5)
      6.0
      >>> exponential_series(2, 3)
      15.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