input: def seriesSum(n: int) -> float:
      """Calculate the sum of the series 1 + 1/2 + 1/3 + ... + 1/n.
      >>> seriesSum(5)
      2.283333333333333
      """
output:     sum = 0.0
      for i in range(1, n + 1):
          sum += 1 / i
      return sum