Commit 5ff597fe by BellCodeEditor

save project

parent 9b2d6464
Showing with 15 additions and 2 deletions
...@@ -2,8 +2,6 @@ ...@@ -2,8 +2,6 @@
import turtle import turtle
screen=turtle.Screen() screen=turtle.Screen()
screen.bgcolor("blue") screen.bgcolor("blue")
len=screen.textinput(100,100)
len=int(len)
pen=turtle.Pen() pen=turtle.Pen()
pen.penup() pen.penup()
pen.goto(100,-100) pen.goto(100,-100)
...@@ -15,6 +13,7 @@ pen.penup() ...@@ -15,6 +13,7 @@ pen.penup()
pen.pendown() pen.pendown()
pen.pensize(5) pen.pensize(5)
pen.pencolor("red") pen.pencolor("red")
pen.left(45) pen.left(45)
pen.forward(2*len) pen.forward(2*len)
pen.circle(len,180) pen.circle(len,180)
......
import turtle
screen=turtle.Screen()
len=screen.textinput("提示","你想要多大的爱心?")
loveize=int(len)
len=60
pen=turtle.Pen()
pen.left(45)
pen.forward(2*loveize)
pen.circle(loveize,180)
pen.right(90)
pen.circle(loveize,180)
pen.forward(2*loveize)
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