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