input: from typing import List
  
  def calculate_exponential_series(x: float, n: int) -> float:
      """ Calculate the sum of the first n terms of the exponential series for a given x.
      The series is defined as: ∑(x^i) from i=0 to n.
      >>> calculate_exponential_series(2, 3)
      15.0
      >>> calculate_exponential_series(0, 5)
      1.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