summaryrefslogtreecommitdiff
path: root/progs/a103.py
blob: aaa38864451c76d9474301c7c88501594138b619 (plain)
1
2
3
4
5
def harmonic_sum(n):
  if n < 2:
    return 1
  else:
    return 1 / n + (harmonic_sum(n - 1))