python怎样用tinker画矩形
答案:1 悬赏:80 手机版
解决时间 2021-03-20 16:38
- 提问者网友:鼻尖触碰
- 2021-03-20 06:46
python怎样用tinker画矩形
最佳答案
- 五星知识达人网友:过活
- 2021-03-20 07:30
def drawRectangle(x = 0.0, y = 0.0, width = 10.0, height = 10.0, color = "black"):
turtle.penup()
turtle.goto(x + width / 2.0, y + height / 2.0)
turtle.color(color)
turtle.pendown()
for i in range(0, 2):
turtle.right(90)
turtle.forward(height)
turtle.right(90)
turtle.forward(width)
turtle.penup()
turtle.penup()
turtle.goto(x + width / 2.0, y + height / 2.0)
turtle.color(color)
turtle.pendown()
for i in range(0, 2):
turtle.right(90)
turtle.forward(height)
turtle.right(90)
turtle.forward(width)
turtle.penup()
我要举报
如以上问答信息为低俗、色情、不良、暴力、侵权、涉及违法等信息,可以点下面链接进行举报!
大家都在看
推荐资讯