Commit 2d6c0083 by BellCodeEditor

save project

parent fb24187b
Showing with 6 additions and 4 deletions
...@@ -3,6 +3,7 @@ import turtle ...@@ -3,6 +3,7 @@ import turtle
screen=turtle.Screen() screen=turtle.Screen()
lovesize=screen.textinput("爱心大小","你想要多大的爱心") lovesize=screen.textinput("爱心大小","你想要多大的爱心")
lovesize=int(lovesize)
screen.bgcolor("light grey") screen.bgcolor("light grey")
pen=turtle.Pen() pen=turtle.Pen()
pen.penup() pen.penup()
...@@ -14,10 +15,10 @@ pen1=turtle.Pen() ...@@ -14,10 +15,10 @@ pen1=turtle.Pen()
pen1.fillcolor("green") pen1.fillcolor("green")
pen1.begin_fill() pen1.begin_fill()
pen1.left(45) pen1.left(45)
pen1.forward(100) pen1.forward(lovesize*2)
pen1.circle(50,180) pen1.circle(lovesize,180)
pen1.right(90) pen1.right(90)
pen1.circle(50,180) pen1.circle(lovesize,180)
pen1.forward(100) pen1.forward(lovesize*2)
pen1.end_fill() pen1.end_fill()
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