diy1.py
631 Bytes
# 利用write()帮助悟空给诺依回信吧~
import turtle
screen=turtle.Screen()
screen.bgcolor("light blue")
len=screen.textinput("100","100")
len=int(len)
pen=turtle.Pen()
pen.penup()
pen.goto(100,-100)
pen.write("你好,\nSB.\n你真是个虫虫有点\n刺眼好办法让广大凤凰于.",font=("Times",13,"normal"))
pen.hideturtle()
pen1=turtle.Pen()
pen1.penup()
pen1.pendown()
pen1.pensize(5)
len=screen.textinput("提示","你想要多大的爱心?")
pen1.pencolor("red")
pen1.left(45)
pen1.forward(2*len)
pen1.circle(len,180)
pen1.right(90)
pen1.circle(len,180)
pen1.forward(2*len)
turtle.done()