Commit 2aec6fa7 by BellCodeEditor

auto save

parent 8d0433c7
Showing with 25 additions and 4 deletions
# 利用write()帮助悟空给诺依回信吧~ # # 利用write()帮助悟空给诺依回信吧~
#导入turtle # #导入turtle
import turtle import turtle
#创建画笔 # #创建画笔
pen=turtle.Pen() pen=turtle.Pen()
#设置背景颜色
screen=turtle.Sceen()
screen.bgcolor('pink')
#写字write #写字write
pen.penup()
pen.goto(-100,0)
pen.write("",font=("Times",30,"normal")) pen.write("",font=("Times",30,"normal"))
#隐藏画笔 #隐藏画笔
pen.hideturtle() pen.hideturtle()
#保存画布 创建新的画笔pen1
pen1=turtle.Pen()
#画笔颜色pencolor
pen1.pencolor('red')
#画笔粗细pensize
pen1.pensize(5)
#画爱心
#左转45度
len=60
pen1.left(45)
pen1.forward(2*len)
pen1.circle(len,180)
pen1.right(90)
pen1.circle(50,180)
pen1.forward(100)
pen1.hideturtle()
turtle.done() 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