Commit 776bb17a by BellCodeEditor

save project

parent 400ab22a
Showing with 2 additions and 1 deletions
...@@ -4,6 +4,7 @@ import turtle ...@@ -4,6 +4,7 @@ import turtle
#设置背景颜色 #设置背景颜色
sc = turtle.Screen() sc = turtle.Screen()
sc.bgcolor("pink") sc.bgcolor("pink")
width = float(sc.textinput("提示","请输入爱心大小:"))
#创建画笔 #创建画笔
pen = turtle.Pen() pen = turtle.Pen()
#移动画笔位置 #移动画笔位置
...@@ -24,6 +25,6 @@ def love(width): ...@@ -24,6 +25,6 @@ def love(width):
pen1.circle(width/2,180) pen1.circle(width/2,180)
pen1.forward(width) pen1.forward(width)
pen1.hideturtle() pen1.hideturtle()
love(100) love(width)
turtle.done() turtle.done()
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