Commit e8c2a2f6 by BellCodeEditor

auto save

parent 654bc3ba
Showing with 40 additions and 0 deletions
import turtle
pen = turtle.Pen()
fontpen=turtle.Pen()
fontpen.write("hello:诺依\n见到你的信很开心",font=("Times",20,"normal"))
fontpen.hideturtle()
fontpen.up()
screen =turtle.Screen()
fontpen.goto(100,-220)
#背景颜色
screen = turtle.Screen()
screen.bgcolor("light blue")
pen.up()
pen.hideturtle()
#定义变量
#len = 50
len = screen.textinput("桃心大小","你想要多大的爱心")
length = int(len)
pen.goto(100,180)
pen.down()
pen.pensize(5)
pen.pencolor("red")
pen.left(45)
pen.circle(length,180)
pen.right(90)
pen.circle(length,180)
pen.forward(2*length)
pen.left(90)
pen.forward(2*length)
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