Commit dc2efa29 by BellCodeEditor

save project

parent 20b95411
Showing with 2 additions and 1 deletions
...@@ -2,6 +2,7 @@ ...@@ -2,6 +2,7 @@
import turtle import turtle
s=turtle.Screen() s=turtle.Screen()
pen=turtle.Pen() pen=turtle.Pen()
a=s.textinput("提示","画多大的爱心?")
s.bgcolor("light blue") s.bgcolor("light blue")
pen.write("你好.",font=("Times",30,"normal")) pen.write("你好.",font=("Times",30,"normal"))
pen.hideturtle() pen.hideturtle()
...@@ -10,7 +11,7 @@ pen.goto(0,-170) ...@@ -10,7 +11,7 @@ pen.goto(0,-170)
pen.pendown() pen.pendown()
pen.pensize(5) pen.pensize(5)
pen.pencolor("red") pen.pencolor("red")
len=150 len=int(a)
pen.left(45) pen.left(45)
pen.forward(2*len) pen.forward(2*len)
pen.circle(len,180) pen.circle(len,180)
......
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