Commit 2dbf154e by BellCodeEditor

save project

parent 07858a54
Showing with 22 additions and 0 deletions
# 利用write()帮助悟空给诺依回信吧~
import turtle
screen=turtle.Screen()
screen.bgcolor("red")
pen=turtle.Pen()
pen.write("你好\n 诺依,\n我已经学会使用turtle.",font=("Times",30,"normal"))
pen.hideturtle()
pen.penup()
pen.goto(-100,0)
pen.pendown()
pen.pensize(5)
pen.pencolor("blue")
a=screen.textinput("提示","请输入爱心的大小")
len=int(a)
pen.left(45)
pen.forward(len*2)
pen.circle(len,180)
pen.right(90)
pen.circle(len,180)
pen.forward(len*2)
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