Commit 0ba9b987 by BellCodeEditor

save project

parent 9c015c19
Showing with 7 additions and 4 deletions
import turtle import turtle
pen=turtle.Pen() pen=turtle.Pen()
len=screen.textinput("提示","你想要多大的爱心呀?")
lovesize=int(len)
screen=turtle.Screen() screen=turtle.Screen()
screen.bgcolor("light pink") screen.bgcolor("light pink")
pen.penup() pen.penup()
...@@ -13,11 +15,11 @@ pen.pensize(10) ...@@ -13,11 +15,11 @@ pen.pensize(10)
pen.pencolor("red") pen.pencolor("red")
pen.left(45) pen.left(45)
len=60 len=60
pen.forward(2*len) pen.forward(2*lovesize)
pen.circle(len,180) pen.circle(lovesize,180)
pen.pencolor("red") pen.pencolor("red")
pen.right(90) pen.right(90)
pen.circle(len,180) pen.circle(lovesize,180)
pen.forward(2*len) pen.forward(2*lovesize)
pen.hideturtle() pen.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