On Fri, Oct 24, 2008 at 6:51 AM, W W <[EMAIL PROTECTED]> wrote: > for i in range(1, n+1): > x = x + (m * (i % 2)) * (4.0/(i*2))
This will omit every other term (when i%2 ==0) and it divides by the even numbers, not odd ones. Kent _______________________________________________ Tutor maillist - Tutor@python.org http://mail.python.org/mailman/listinfo/tutor