Commit 0a85d6df by BellCodeEditor

auto save

parent eb1d3fbc
Showing with 16 additions and 24 deletions
# 利用write()帮助悟空给诺依回信吧~ # import turtle
import turtle # pen=turtle.Pen()
pen=turtle.Pen() # pen.pencolor("red")
pen.penup() # pen.penup()
pen.goto(100,-100) # pen.goto(0,60)
screen=turtle.Screen() # pen.pensize(5)
screen.bgcolor("lightgreen") # screen=turtle.Screen()
pen.write("诺依\nturtle不好用\n有点麻烦",font=("Times",40,"normal")) # screen.bgcolor("pink")
pen.hideturtle() # pen.pendown()
len1=screen.textinput("PS","半径是多少") # pen.left(45)
len=int(len1) # pen.forward(100)
pen1=turtle.Pen() # pen.circle(50,180)
pen1.pensize(5) # pen.right(90)
pen1.pencolor("red") # pen.circle(50,180)
pen1.left(45) # pen.forward(100)
pen1.forward(len*2) # turtle.done()
pen1.circle(len,180)
pen1.right(90)
pen1.circle(len,180)
pen1.forward(len*2)
pen1.hideturtle()
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