Commit ed3b9034 by BellCodeEditor

save project

parent 9b2a9b73
Showing with 5 additions and 4 deletions
import turtle import turtle
screen=turtle.Screen() screen=turtle.Screen()
screen.bgcolor("light blue") screen.bgcolor("light blue")
len=100 len=screen.textinput("提示","你想输入多少")
lielen=int(len)
pen=turtle.Pen() pen=turtle.Pen()
pen.penup() pen.penup()
pen.goto(100,-100) pen.goto(100,-100)
...@@ -11,10 +12,10 @@ Pen1=turtle.Pen() ...@@ -11,10 +12,10 @@ Pen1=turtle.Pen()
Pen1.pensize(5) Pen1.pensize(5)
Pen1.pencolor("red") Pen1.pencolor("red")
Pen1.left(45) Pen1.left(45)
Pen1.forward(len) Pen1.forward(lielen)
Pen1.circle(len/2,180) Pen1.circle(lielen/2,180)
Pen1.right(90) Pen1.right(90)
Pen1.circle(len/2,180) Pen1.circle(lielen/2,180)
Pen1.forward(100) Pen1.forward(100)
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