Commit 7c8d918b by BellCodeEditor

save project

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