def make_pi(terms): print "Terms", "Estimate" p = 0 for d in range(1,terms,4): p = p + (4.0/d) - (4.0/(d+2)) print d, p