摘要: #七段数码管绘制import turtle as timport time as Tdef drawGap(): #绘制数码管的间隔 t.penup() t.fd(5)def drawLine(draw): #绘制单段数码管,draw为True时,则实画 drawGap(); t.pendown() 阅读全文
posted @ 2019-07-23 20:31 板岩 阅读(345) 评论(0) 推荐(0) 编辑
摘要: #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 阅读全文
posted @ 2019-07-23 11:08 板岩 阅读(470) 评论(0) 推荐(0) 编辑
摘要: 例子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": ... 阅读全文
posted @ 2019-07-23 08:36 板岩 阅读(399) 评论(0) 推荐(0) 编辑