Does anyone know how to write a program in Python that will calculate the addition of the harmonic series. i.e. 1 + 1/2 +1/3 +1/4...
How about this:
partialsum = 0 for i in xrange(1,1000000): partialsum += 1.0 / i print partialsum
where 1000000 is the upper bound.