1.要求能算到小数点后面越多越好(5分)
2.并用进度条提示算的进度,,能给出多种进度条越好(5分)
3.要求给出算圆周率Pi具体公式或者算法说明
1 pi = 0 2 N = 100 3 for k in range(N): 4 pi += 1/pow(16,k) * (4/(8 * k + 1) - 2/(8 * k + 4) - 1/(8 * k + 5) - 1/(8 * k + 6)) 5 print("圆周率值是:{}".format(pi)) 6 from tqdm import trange 7 import time 8 for i in trange(100): 9 time.sleep(0.1)