Commit 45944094 by BellCodeEditor

auto save

parent 95e1b234
Showing with 8 additions and 9 deletions
#导入模块
import turtle
screen=turtle.Screen()
len=screen.textinput("提示","你想要多大的爱心?")
lovesize=int(len)
screen.bgcolor("light blue")
#创建画笔
Pen=turtle.Pen()
Pen.penup()
Pen.goto(100,-100)
Pen.write("黑蚊子多",font=("Times",20,"normal"))
Pen.write("横眉冷对千夫指,\n俯首甘为孺子牛。\n-鲁迅",font=("Times",20,"normal"))
Pen.hideturtle()
#画爱心
len=100
Pen1=turtle.Pen()
Pen1.hideturtle()
Pen1.pencolor("light green")
Pen1.pencolor("yellow green")
Pen1.pensize(5)
Pen1.left(45)
Pen1.forward(2*len)
Pen1.circle(len,180)
Pen1.forward(2*lovesize)
Pen1.circle(lovesize,180)
Pen1.right(90)
Pen1.circle(len,180)
Pen1.forward(2*len)
Pen1.circle(lovesize,180)
Pen1.forward(2*lovesize)
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