Commit 8b064c20 by BellCodeEditor

save project

parent ac5c298b
Showing with 6 additions and 5 deletions
...@@ -8,16 +8,17 @@ pen.goto(100,-100) ...@@ -8,16 +8,17 @@ pen.goto(100,-100)
pen.write("hi,诺伊",font=("Times",30,"normal")) pen.write("hi,诺伊",font=("Times",30,"normal"))
pen.hideturtle() pen.hideturtle()
pen1=turtle.Pen() pen1=turtle.Pen()
len=50 len=a.textinput("不告诉你","圆的半径")
len=int(len)
pen1.left(45) pen1.left(45)
pen1.forward(2*len) pen1.forward(2*int(len))
#第一个半圆 #第一个半圆
pen1.circle(len,180) pen1.circle(int(len),180)
#第二个半圆 #第二个半圆
pen1.right(90) pen1.right(90)
pen1.circle(len,180) pen1.circle(int(len),180)
#最后一条直线 #最后一条直线
pen1.forward(2*len) pen1.forward(2*int(len))
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