input: Write a function to calculate the sum of the series 1 + ½ + ⅓ + ... + 1/n.
  
  Below is the function:
  
  
  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
  
  
  Test the function with the following code:
  
  
  print(seriesSum(5))
  
  
  The expected output is:
  
  
  2.283333333333333
  
output: def seriesSum(n):
      total = 0
      for i in range(1, n+1):
          total += 1 / i
      return total