Commit 9310a74b by BellCodeEditor

save project

parent d16cb4ac
Showing with 6 additions and 5 deletions
...@@ -2,6 +2,7 @@ ...@@ -2,6 +2,7 @@
import turtle import turtle
screen=turtle.Screen() screen=turtle.Screen()
screen.bgcolor("light blue") screen.bgcolor("light blue")
len=screen.textinput("提示","100")
pen=turtle.Pen() pen=turtle.Pen()
pen.penup() pen.penup()
pen.goto(x=100,y=-100) pen.goto(x=100,y=-100)
...@@ -9,13 +10,13 @@ pen.write("你好\.",font=("Times",30,"normal")) ...@@ -9,13 +10,13 @@ pen.write("你好\.",font=("Times",30,"normal"))
pen.hideturtle() pen.hideturtle()
pen1=turtle.Pen() pen1=turtle.Pen()
pen1.pencolor("red") pen1.pencolor("red")
len1=int(len)
pen1.pensize(5) pen1.pensize(5)
pen1.left(45) pen1.left(45)
lent=60 pen1.forward(2*len1)
pen1.forward(2*lent) pen1.circle(len1,180)
pen1.circle(lent,180)
pen1.right(90) pen1.right(90)
pen1.circle(lent,180) pen1.circle(len1,180)
pen1.forward(2*lent) pen1.forward(2*len1)
pen1.hideturtle() pen1.hideturtle()
turtle.done() 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