input: from typing import List
  
  def exponential_series(x: int, n: int) -> int:
      """
      Calculate an exponential series that sums all the powers of x from 0 to n.
      
      >>> exponential_series(2, 3)
      15
      >>> exponential_series(3, 4)
      121
      """
      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