Commit d15a2e1f by BellCodeEditor

auto save

parent c2f1308f
Showing with 33 additions and 0 deletions
#导入
import turtle
#创建画笔
pen = turtle.Pen()
#背景颜色
screen = turtle.Screen()
screen.bgcolor("pink")
#写字
pen.write("Ihewrfbjsk\nldnvsprihjbik\nncvl kbnsdgjnfsklb",font=("Times",30,"normal"))
#转移阵地
pen.penup()
pen.goto(-100,100)
pen.pendown()
#画爱心
#半径
#弹窗:数据类型转换
r=int(screen.textinput("提示","爱心尺寸"))
pen.pensize(5)
pen.pencolor("red")
pen.left(45)
pen.forward(2*r)
pen.circle(r,180)
pen.right(90)
pen.circle(r,180)
pen.forward(2*r)
#隐藏画笔
pen.hideturtle()
#保存画布
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