标签:sqrt 结束 nbsp mat code class style for orm
from math import* from time import* scale=15 p=1 q=2 print("执行开始".center(scale//2, "-")) start = perf_counter() for i in range(scale+1): p=sqrt((1-sqrt(1-pow(p,2)))/2) q=q*2 a = ‘*‘ * i b = ‘.‘ * (scale - i) c = (i/scale)*100 dur = perf_counter() - start print("\r{:^3.0f}%[{}->{}]{:.2f}s".format(c,a,b,dur)) sleep(0.1) Pi=p*q print("Pi值是{}".format(Pi)) print("\n"+"执行结束".center(scale//2,‘-‘))
标签:sqrt 结束 nbsp mat code class style for orm
原文地址:https://www.cnblogs.com/dongyichen/p/12700537.html