Commit ea3f88f5 by BellCodeEditor

save project

parent f60d90c6
Showing with 8 additions and 4 deletions
...@@ -2,17 +2,22 @@ len=50 ...@@ -2,17 +2,22 @@ len=50
import turtle import turtle
pen=turtle.Pen() pen=turtle.Pen()
screen=turtle.Screen() screen=turtle.Screen()
len=screen.textinput("姓名:","你要多大的心?")
len=float(len)
screen.bgcolor("red") screen.bgcolor("red")
pen.penup() pen.penup()
pen.goto(-100,200) pen.goto(-100,0)
pen.write("你\n\n呀",font=("Times",20,"normal")) pen.write("你\n\n呀",font=("Times",20,"normal"))
pen.penup()
pen.goto(0,0)
pen.pendown()
pen.pensize(10)
pen.pencolor("blue") pen.pencolor("blue")
pen.left(45) pen.left(45)
pen.forward(2*len) pen.forward(2*len)
pen.circle(len,180) pen.circle(len,180)
pen.left(90) pen.right(90)
pen.circle(len,180) pen.circle(len,180)
pen.left(90)
pen.forward(2*len) pen.forward(2*len)
pen.hideturtle() pen.hideturtle()
turtle.done() 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