Commit fe98e938 by BellCodeEditor

save project

parent 961b103e
Showing with 11 additions and 5 deletions
import turtle
screen=turtle.Screen()
screen.textinput("姓名框","你的名字是")
\ No newline at end of file
import turtle import turtle
Pen=turtle.Pen() Pen=turtle.Pen()
len=10
screen=turtle.Screen() screen=turtle.Screen()
len=screen.textinput("大小设置","大小为")
lovesize=int(len)
screen.bgcolor("light blue") screen.bgcolor("light blue")
Pen.penup() Pen.penup()
Pen.goto(100,-100) Pen.goto(100,-100)
...@@ -11,11 +12,11 @@ pen1=turtle.Pen() ...@@ -11,11 +12,11 @@ pen1=turtle.Pen()
pen1.fillcolor("red") pen1.fillcolor("red")
pen1.begin_fill() pen1.begin_fill()
pen1.left(45) pen1.left(45)
pen1.forward(len*2) pen1.forward(lovesize*2)
pen1.circle(len,180) pen1.circle(lovesize,180)
pen1.right(90) pen1.right(90)
pen1.circle(len,180) pen1.circle(lovesize,180)
pen1.forward(len*2) pen1.forward(lovesize*2)
pen1.end_fill() pen1.end_fill()
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