Python用turtle画矩形

更新时间:2023-07-30 22:12:31 阅读: 评论:0

Python⽤turtle画矩形import turtle
小三阳治疗turtle.width(2)# 初始化画笔⼤⼩
归园田居五首
# 思路:每个框进⾏绘制然后通过改变坐标改变位置⽅法⽐较笨
# 1 第⼀个框其后依次通过坐标来规定每个框的位置
turtle.showturtle()
turtle.forward(100)
turtle.right(90)
turtle.penup()
turtle.tilt(90)
turtle.pendown()
turtle.forward(100)
turtle.penup()
turtle.right(90)
turtle.pendown()
turtle.forward(100)
turtle.penup()
turtle.right(90)
turtle.pendown()
turtle.forward(100)
turtle.hideturtle()
# 2
turtle.showturtle()
turtle.penup()
腹黑文(0,40)
turtle.pendown()
turtle.forward(100)
turtle.right(90)
艺术的起源
turtle.penup()
turtle.tilt(90)
卷的英文turtle.pendown()
turtle.forward(100)
turtle.penup()
turtle.right(90)
turtle.pendown()
曹雪芹是男是女turtle.forward(100)
情人节创意礼物
turtle.penup()
turtle.right(90)
turtle.pendown()
turtle.forward(100)
turtle.hideturtle()
# 3
turtle.showturtle()
明月照我还turtle.penup()
<(-25,40)
turtle.pendown()
turtle.forward(100)
turtle.right(90)
turtle.penup()
turtle.tilt(90)
turtle.pendown()
turtle.pendown() turtle.forward(100)
turtle.penup() turtle.right(90) turtle.pendown() turtle.forward(100)
turtle.penup() turtle.right(90) turtle.pendown() turtle.forward(100) turtle.hideturtle()
# 4
turtle.showturtle() turtle.penup() (-25,0) turtle.pendown() lor("red") turtle.forward(100) turtle.right(90)
turtle.penup() turtle.tilt(90) turtle.pendown() turtle.forward(100)
turtle.penup() turtle.right(90) turtle.pendown() turtle.forward(100)
turtle.penup() turtle.right(90) turtle.pendown() turtle.forward(100) turtle.hideturtle()
turtle.done()

本文发布于:2023-07-30 22:12:31,感谢您对本站的认可!

本文链接:https://www.wtabcd.cn/fanwen/fan/82/1124124.html

版权声明:本站内容均来自互联网,仅供演示用,请勿用于商业和其他非法用途。如果侵犯了您的权益请与我们联系,我们将在24小时内删除。

标签:改变   坐标   礼物   起源
相关文章
留言与评论(共有 0 条评论)
   
验证码:
推荐文章
排行榜
Copyright ©2019-2022 Comsenz Inc.Powered by © 专利检索| 网站地图