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()