input: Write a function to calculate the sum of the series 1 + ½ + ⅓ + ... + 1/n. The function should take an integer n as input and return the sum of the series from 1 to 1/n. If n is 0, the function should return 0.
  
  def seriesSum(n):
      if n == 0:
          return 0
      total = 0
      for i in range(1, n+1):
          total += 1 / i
      return total
  
  assert seriesSum(5) == 2.283333333333333
  assert seriesSum(0) == 0
  assert seriesSum(1) == 1
  assert seriesSum(2) == 1.5
output: def seriesSum(n):
      if n == 0:
          return 0
      total = 0
      for i in range(1, n+1):
          total += 1 / i
      return total