Commit c1aead45 by BellCodeEditor

save project

parent 4aa0a5c1
Showing with 8 additions and 9 deletions
import turtle import turtle
x=200
pen=turtle.Pen() pen=turtle.Pen()
pen1=turtle.Pen() pen1=turtle.Pen()
pen.pensize(10) pen.pensize(10)
pen.pencolor("red") pen.pencolor("red")
screen=turtle.Screen()
pen1.penup() pen1.penup()
pen1.goto(100,50) pen1.goto(100,50)
pen1.write("你好,\n诺依",font=("Times",20,"normal")) pen1.write("你好,\n诺依",font=("Times",20,"normal"))
y=screen.textinput("提示","请输入1~100")
z=int(y)
pen.fillcolor("red") pen.fillcolor("red")
pen.begin_fill() pen.begin_fill()
pen.left(45) pen.left(45)
pen.forward(x) pen.forward(z)
pen.circle(1/2*x,180) pen.circle(1/2*z,180)
pen.right(90) pen.right(90)
pen.circle(1/2*x,180) pen.circle(1/2*z,180)
pen.forward(x) pen.forward(z)
pen.end_fill() pen.end_fill()
pen.hideturtle() pen.hideturtle()
pen1.hideturtle() pen1.hideturtle()
turtle.done() turtle.done()
\ No newline at end of file
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