Commit b45bbed2 by BellCodeEditor

save project

parent 07858a54
Showing with 24 additions and 0 deletions
# 利用write()帮助悟空给诺依回信吧~
import turtle
c=turtle.Screen()
c.bgcolor("light blue")
a=turtle.Pen()
a.penup()
a.goto(100,-50)
a.write("你好呀!诺依\n我也会用turtle模块写贺卡了!",font=("Times",15,"normal"))
a.hideturtle()
d=c.textinput("设置爱心的大小","你想要多大的爱心呢")
d=int(d)
b=turtle.Pen()
b.pensize(4)
b.pencolor("blue")
b.left(45)
b.forward(2*d)
b.circle(d,180)
b.right(90)
b.circle(d,180)
b.forward(2*d)
b.hideturtle()
turtle.done()
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