Commit 40616da3 by BellCodeEditor

save project

parent bb7991db
Showing with 26 additions and 0 deletions
import turtle
pen1=turtle.Pen()
screen=turtle.Screen()
len=screen.textinput("爱心大小","你想要多大的爱心")
len=int(len)
screen.bgcolor("pink")
pen1.penup()
pen1.goto(100,-100)
pen1.write("诺依,\n我会在画布\n上写字了,\nturtle\n真好用!",font=("Times",20,"normal"))
pen1.hideturtle()
pen=turtle.Pen()
pen.shape("square")
pen.pencolor("red")
pen.begin_fill()
pen.pensize(5)
pen.fillcolor("red")
pen.left(45)
pen.forward(2*len)
pen.circle(len,180)
pen.right(90)
pen.circle(len,180)
pen.forward(2*len)
pen.end_fill()
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