diy1.py
510 Bytes
# 利用write()帮助悟空给诺依回信吧~
import turtle
screen=turtle.Screen()
c=screen.textiput("提示","你要画多大的爱心")
b=int(c)
screen.bgcolor("light blue")
pen=turtle.Pen()
pen.penup()
pen.goto(-100,0)
pen.write("Hi\n处处闻啼鸟。",font=("Times",30,"normal"))
turtle.done()
pen1=turtle.Pen()
pen1.pensize(5)
pen1.pencolor("red")
pen1.left(45)
pen1.forward(2*b)
pen1.circle(b,180)
pen1.right(90)
pen1.circle(b,180)
pen1.forward(2*b)
pen1.hideturtle
turtle.done()