Commit aa224e28 by BellCodeEditor

save project

parent 806281f1
Showing with 7 additions and 5 deletions
...@@ -2,6 +2,7 @@ import turtle ...@@ -2,6 +2,7 @@ import turtle
screen = turtle.Screen() screen = turtle.Screen()
screen.bgcolor("green") screen.bgcolor("green")
len = screen.textinput("大小","你想要多大的爱心?") len = screen.textinput("大小","你想要多大的爱心?")
string = screen.textinput("字儿","你想要输入什么?")
lovesize = float(len) lovesize = float(len)
pen = turtle.Pen() pen = turtle.Pen()
pen.penup() pen.penup()
...@@ -9,12 +10,12 @@ pen.goto(100,-100) ...@@ -9,12 +10,12 @@ pen.goto(100,-100)
turtle.pensize(6) turtle.pensize(6)
turtle.pencolor("red") turtle.pencolor("red")
turtle.left(45) turtle.left(45)
turtle.forward(2 * len) turtle.forward(2 * lovesize)
turtle.circle(len,180) turtle.circle(lovesize,180)
turtle.right(90) turtle.right(90)
turtle.circle(len,180) turtle.circle(lovesize,180)
turtle.forward(2 * len) turtle.forward(2 * lovesize)
turtle.hideturtle() turtle.hideturtle()
pen.write("符长允很绿", font = ("Times",30,"normal")) pen.write(string, font = ("Times",30,"normal"))
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