Commit f8516086 by BellCodeEditor

save project

parent fb5d00ba
Showing with 7 additions and 6 deletions
import turtle import turtle
screen=turtle.Screen() screen=turtle.Screen()
screen.bgcolor("blue") screen.bgcolor("blue")
len=screen.textinput("姓名","你叫啥") len=screen.textinput("姓名","你要多长的半径")
len1=int(len)
pen=turtle.Pen() pen=turtle.Pen()
pen.penup() pen.penup()
pen.goto(200,0) pen.goto(200,0)
...@@ -13,12 +14,12 @@ pen.goto(100,100) ...@@ -13,12 +14,12 @@ pen.goto(100,100)
pen.pendown() pen.pendown()
pen1=turtle.Pen() pen1=turtle.Pen()
pen1.left(45) pen1.left(45)
pen1.forward(len*2) pen1.forward(len1*2)
pen1.circle(len,180) pen1.circle(len1,180)
pen1.right(90) pen1.right(90)
pen1.circle(len,180) pen1.circle(len1,180)
pen1.forward(len*2) pen1.forward(len1*2)
pen1.size("100") pen1.size(100)
pen1.pencolor("red") pen1.pencolor("red")
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