def somme_inverses(n):
    S = 0
    for k in range(1,n+1):
        S = S + 1/k
    return S
