摘要:
from random import* from time import* DARTS=10001000 hits=0.0 start=perf_counter() for i in range(1,DARTS+1): x,y=random(),random() dist=pow(x2+y2,0.5 閱讀全文
摘要:
import time scale=10 print(" 執(zhí)行開始 ") for i in range(scale+1): a='**'i b='..'(scale-i) c=(i/scale)*100 print("{:^3.0f}%[{}->{}]".format(c,a,b)) time.sl 閱讀全文