input: Write a function to calculate the sum of the series 1 + ½ + ⅓ + ... + 1/n. Given an input n, the function should return the sum of the series up to the nth term.
  
  def seriesSum(n):
      # set the initial sum to 0
      total = 0
  
      # loop over the range
      for i in range(1, n+1):
          total += 1 / i
  
      return total
  
  assert seriesSum(5) == 2.283333333333333
  assert seriesSum(3) == 1.8333333333333333
  assert seriesSum(1) == 1.0
  assert seriesSum(10) == 2.9289682539682538
  assert seriesSum(0).is_integer() == True
output: def seriesSum(n):
      total = 0
      for i in range(1, n+1):
          total += 1 / i
      return total