摘要:
#七段数码管绘制import turtle as timport time as Tdef drawGap(): #绘制数码管的间隔 t.penup() t.fd(5)def drawLine(draw): #绘制单段数码管,draw为True时,则实画 drawGap(); t.pendown() 阅读全文
摘要:
#CalPiV2.pyfrom random import randomfrom time import perf_counterDARTS = 1000*1000hits=0.0start = perf_counter()for i in range(1,DARTS+1): x,y = rando 阅读全文
摘要:
例子1:s="PYTHON"while s !="": for c in s : if c == "T": break print(c,end="") s=s[:-1] 》》》PYPYPYPYPYP例子2: s="PYTHON"while s !="": for c in s : if c == "T": ... 阅读全文