input: from typing import List
  
  def exponential_series(x: float, n: int) -> float:
      """ Calculate the sum of the exponential series up to the nth term for a given x.
      >>> exponential_series(1.0, 3)
      4.0
      >>> exponential_series(2.0, 5)
      63.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