Discuss / Python / 作业

作业

Topic source

雷锋20110

#1 Created at ... [Delete] [Delete and Lock User]

def pi(N): l = itertools.takewhile(lambda x : x < 2*N,itertools.count(1,2)) p = 0 t = 4 for i in l: p += t/i t = -t return p


  • 1

Reply