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