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