#!/usr/bin/env python # # sum N terms of 1/N and subtract from 1 # N=100 sum=0.0 for i in range(N): sum+=1.0/N print sum-1.0