Commit c9061e9c by BellCodeEditor

save project

parent 07858a54
Showing with 39 additions and 0 deletions
# # 利用write()帮助悟空给诺依回信吧~
import turtle
screen=turtle.Screen()
screen.bgcolor("pink")
pen=turtle.Pen()
pen.penup()
pen.goto(100,-100)
pen.write("你好\n再见\n",font=("Times",15,"normal"))
pen1=turtle.Pen()
def aixing(len,yanse,cusi):
len_1=screen.textinput("问题","输入爱心大小")
len=int(len_1)
cusi_1=screen.textinput("问题","输入爱心粗细")
cusi=int(cusi_1)
yanse=screen.textinput("问题","输入爱心颜色")
pen1.pensize(cusi)
pen1.color(yanse)
pen1.left(45)
pen1.forward(2*len)
pen1.circle(len,180)
pen1.right(90)
pen1.circle(len,180)
pen1.forward(2*len)
pen1.left(45)
aixing(80,"blue",10)
pen1.penup()
pen1.goto(0,50)
pen1.pendown()
aixing(50,"yellow",6)
pen1.penup()
pen1.goto(0,100)
pen1.pendown()
aixing(20,"red",3)
pen1.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