Commit 9ed8de8e by BellCodeEditor

auto save

parent 2f6cf0ee
Showing with 0 additions and 26 deletions
#导入turtle模块
import turtle
#创建画笔
pen=turtle.Pen()
#导入正文
screen=turtle.Screen()
len=int(screen.textinput("提示","请输入半径"))
screen.bgcolor("pink")
pen.penup()
pen.goto(100,-100)
pen.write("诺依,\nturtle真好用,\n我会在画布上写字啦!",font=("Times",30,"normal"))
#隐藏画笔
pen.hideturtle()
#画爱心
pen=turtle.Pen()
pen.pensize(10)
pen.pencolor("red")
pen.left(45)
pen.forward(len*2)
pen.circle(len,180)
pen.right(90)
pen.circle(len,180)
pen.forward(len*2)
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