Commit 7c8d918b by BellCodeEditor

save project

parent 28649644
Showing with 21 additions and 15 deletions
# 利用write()
import turtle
screen=turtle.Screen()
pen1=turtle.Pen()
screen.bgcolor("gold")
# creen=tusrtle.Screen()
# screen.bgcolor("light blue")
......@@ -9,24 +10,29 @@ screen.bgcolor("gold")
# pen=turtle.Pen()
# pen.write("你好\n诺依\春眠不觉晓",font=("Times",30,"normal"))
# pen.hideturtle()
# len=60
# pen.penup()
# pen.goto(100,100)
# pen.pendown()
# pen.pensize(5)
# pen.pencolor("red")
# pen.left(45)
# pen.forward(2*len)
# pen.circle(len,180)
# pen.right(90)
# pen.circle(len,180)
# pen.forward(2*len)
# turtle.done()
pen1=turtle.Pen()
a=screen.textinput("设置大小","大小")
b=int(a)
len=60
pen1.penup()
pen1.goto(100,100)
pen1.down()
pen1.pensize(5)
pen1.pencolor("red")
pen1.left(45)
pen1.forward(2*b)
pen1.circle(b,180)
pen1.right(90)
pen1.circle(b,180)
pen1.forward(2*b)
turtle.done()
pen1.pencolor("red")
pen1.pensize(5)
pen1.left(45)
pen1.forward(100)
pen1.right(-45)
pen1.circle(50,180)
pen1.right(90)
pen1.circle(50,180)
pen1.forward(100)
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