Commit 33a54ed2 by BellCodeEditor

save project

parent 93cb51b3
Showing with 8 additions and 6 deletions
...@@ -2,6 +2,9 @@ ...@@ -2,6 +2,9 @@
import turtle import turtle
pen=turtle.Pen() pen=turtle.Pen()
pen.hideturtle() pen.hideturtle()
screen=turtle.Screen()
screen.bgcolor("light blue")
len=float(screen.textinput("提示","你想要多大的爱心?"))
pen.penup() pen.penup()
pen.forward(-420) pen.forward(-420)
pen.pendown() pen.pendown()
...@@ -23,12 +26,10 @@ pen1.fillcolor("red") ...@@ -23,12 +26,10 @@ pen1.fillcolor("red")
pen1.pensize(10) pen1.pensize(10)
pen1.begin_fill() pen1.begin_fill()
pen1.left(45) pen1.left(45)
pen1.forward(100) pen1.forward(len*2)
pen1.circle(50,180) pen1.circle(len,180)
pen1.right(90) pen1.right(90)
pen1.circle(50,180) pen1.circle(len,180)
pen1.forward(100) pen1.forward(len*2)
abc=turtle.Screen()
abc.bgcolor("light blue")
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