绘制漂亮的七段数码管.py
import turtle,time def drawGap(): #绘制数码管间隔 turtle.penup() turtle.fd(5) def drawLine(draw): #绘制单段数码管 drawGap() turtle.pendown() if draw else turtle.penup() turtle.fd(40) drawGap() turtle.right(90) def drawDigit(digit): #根据数字绘制七段数码管 drawLine(True) if digit in
下载地址
用户评论