Commit 593d5f50 by BellCodeEditor

save project

parent 654bc3ba
Showing with 26 additions and 0 deletions
import turtle #导入画图模块
#写文字
pen=turtle.Pen() #创建画笔
screen=turtle.Screen()
len=screen.textinput("提示","你想要多大的爱心?")
lovesize=int(len)
screen.bgcolor('light green')
pen.penup()
pen.goto(66,-250)
pen.write('老\n\n\n\n!',font=('Times',20,'normal')) #书写文字
pen.hideturtle() #隐藏画笔
# turtle.done() #保留画布
#画爱心
pen1=turtle.Pen()
pen1.pensize(5) #设置画笔尺寸
pen1.pencolor('red') #设置画笔颜色
pen1.left(45)
pen1.forward(lovesize*2) #正方形边长
pen1.circle(lovesize,180) #画圆弧
pen1.right(90)
pen1.circle(lovesize,180)
pen1.forward(lovesize*2)
pen1.hideturtle()
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