Commit fa574414 by BellCodeEditor

auto save

parent d5ba7fed
Showing with 37 additions and 0 deletions
#导入
import turtle
#创建画笔
pen = turtle.Pen()
#创建屏幕
srceen = turtle.Screen()
#改变背景颜色
srceen.bgcolor("pink")
#写字
pen.write("祝福语!\n,晴天柱",font=("Times",25,"normal"))
pen.pencolor("red")
pen.pensize(7)
#转移阵地
pen.penup()
pen.goto(-100,50)
pen.pendown()
#注意数据类型转换
len = int(srceen.textinput("提示","爱心大小"))
#画爱心
pen.left(45)
pen.forward(len)
pen.circle(len/2,180)
pen.right(90)
pen.circle(len/2,180)
pen.forward(len)
#隐藏画笔
pen.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