Commit d64bfcad by BellCodeEditor

save project

parent aee827dc
Showing with 8 additions and 4 deletions
......@@ -3,6 +3,9 @@ import turtle
#背景颜色
screen=turtle.Screen()
screen.bgcolor("light pink")
#询问想要多大的爱心
len=screen.textinput("提示","你想要多大的爱心啊?")
lovesize=int(len)
#写字
p=turtle.Pen()
p.penup()
......@@ -15,10 +18,10 @@ p1.pencolor("red")
p1.pensize(5)
#画爱心
p1.left(45)
p1.forward(100)
p1.circle(50,180)
p1.forward(2*lovesize)
p1.circle(lovesize,180)
p1.right(90)
p1.circle(50,180)
p1.forward(100)
p1.circle(lovesize,180)
p1.forward(2*lovesize)
#保存画布
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