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))
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))