圆周率

import math
import time
s=10
t=time.process_time()
for i in range(s+1):
      a,b='**'*i,'..'*(s-i)
      c=(i/s)*100
      π=4*(4*math.atan(1/5)-math.atan(1/239))
print("%{:3}[{}->{}]".format(a,b,c))
time.sleep(0.1)
print(π)
print("{:.2f}s".format(t))

 

posted @ 2020-03-30 08:23  Zeta——  阅读(147)  评论(0编辑  收藏  举报