Commit e19302d9 by BellCodeEditor

save project

parent 07858a54
Showing with 30 additions and 0 deletions
# 利用write()帮助悟空给诺依回信吧~
import turtle
pen=turtle.Pen()
screen=turtle.Screen()
len=screen.textinput("提示","你想要多大的爱心")
len1=float(len)
screen.bgcolor("pink")
#设置一个爱心
pen.fillcolor("red")
pen.begin_fill()
pen.goto(0,0)
pen.setheading(45)
pen.forward(2*len1)
pen.circle(len1,180)
pen.right(90)
pen.circle(len1,180)
pen.forward(2*len1)
pen.end_fill()
#写字
pen.penup()
pen.goto(100,-100)
pen.pendown()
pen.write("hqs\nwyz\nTom\n你好",font=("Times",30,"normal"))
pen.hideturtle()
turtle.done()
\ No newline at end of file
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or sign in to comment