diy1.py
632 Bytes
# 利用write()帮助悟空给诺依回信吧~
import turtle
a=turtle.Pen()
a.write("猪福语:\n诺依,你个傻*,\n滚蛋!",font=("times",30,"normal"))
a.goto(-150,0)
a.fillcolor("red")
a.begin_fill()
a.setheading(45)
a.fd(100)
a.circle(50,180)
a.right(90)
a.circle(50,180)
a.fd(100)
a.end_fill()
a.setheading(20)
def www(w):
a.setheading(90)
a.left(w)
a.fd(20)
for i in range(3):
www(20)
www(-20)
www(20)
a.setheading(90)
a.left(-20)
a.fd(13)
a.pu()
a.goto(-150,0)
a.setheading(0)
a.shape("turtle")
a.fillcolor("green")
for i in range(500):
a.fd(0.2)
turtle.done()