input: Write a function to calculate the sum of the series 1 + 1/2 + 1/3 + ... + 1/n.
  assert series_sum(1) == 1.0
  assert series_sum(2) == 1.5
  assert series_sum(3) == 1.8333333333333333
  assert series_sum(5) == 2.283333333333333
output: def series_sum(n):
      return sum(1 / i for i in range(1, n + 1))