input: def exponential_series(x: float, n: int) -> float:
      """
      Calculate the sum of an exponential series from 0 to n for a given x.
      The series is defined as: sum(x**i for i in range(n+1))
  
      >>> exponential_series(2, 3)
      15.0
      >>> exponential_series(3, 2)
      13.0
      """
output:     result = 0.0
      for i in range(n + 1):
          result += x ** i
      return result