Commit 048c9114 by BellCodeEditor

save project

parent ccb2b9a0
Showing with 6 additions and 5 deletions
# 利用write()帮助悟空给诺依回信吧~ # 利用write()帮助悟空给诺依回信吧~
import turtle import turtle
screen=turtle.Screen() screen=turtle.Screen()
v=screen.textinput("提示","爱心大小")
screen.bgcolor("pink") screen.bgcolor("pink")
pen=turtle.Pen() pen=turtle.Pen()
pen.penup() pen.penup()
...@@ -10,13 +11,12 @@ pen1=turtle.Pen() ...@@ -10,13 +11,12 @@ pen1=turtle.Pen()
pen1.pencolor("red") pen1.pencolor("red")
pen1.pensize(3) pen1.pensize(3)
pen1.left(45) pen1.left(45)
len=30 pen1.forward(2*v)
pen1.forward(2*len)
pen1.left(45) pen1.left(45)
pen1.circle(len,180) pen1.circle(v,180)
pen1.right(180) pen1.right(180)
pen1.circle(len,180) pen1.circle(v,180)
pen1.left(45) pen1.left(45)
pen1.forward(2*len) pen1.forward(2*v)
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