Commit a6217b29 by BellCodeEditor

save project

parent 59e7d836
Showing with 22 additions and 22 deletions
# 利用write()帮助悟空给诺依回信吧~ # 利用write()帮助悟空给诺依回信吧~
import turtle#导入turtle模块 import turtle#导入turtle模块
screen=turtle.Screen()#设置屏幕 screen=turtle.Screen()#设置屏幕
screen.bgcolor("black")# screen.bgcolor("black")#设置屏幕
pen=turtle.Pen()# pen=turtle.Pen()#创建pen
pen.pencolor("yellow")# pen.pencolor("yellow")#设置pen的颜色
pen.penup()# pen.penup()#抬笔
pen.goto(100,-100)# pen.goto(100,-100)#移动
pen.write("你好,\n诺依.",font=("Times",20,"normal"))# pen.write("你好,\n诺依.",font=("Times",20,"normal"))#写
pen.hideturtle()# pen.hideturtle()#隐藏pen
pen1=turtle.Pen()# pen1=turtle.Pen()#创建pen1
pen1.pensize(5)# pen1.pensize(5)#设置笔的粗细
pen1.pencolor("red")# pen1.pencolor("red")#设置pen1的颜色
pen1.fillcolor("red")# pen1.fillcolor("red")#设置填充颜色
pen1.left(45)# pen1.left(45)#左转
pen1.begin_fill()# pen1.begin_fill()#开始
pen1.forward(100)# pen1.forward(100)#往前走
pen1.circle(45,180)# pen1.circle(45,180)#圆的半径和颜色
pen1.right(95)# pen1.right(95)#右转
pen1.circle(45,180)# pen1.circle(45,180)#圆的半径和颜色
pen1.forward(100)# pen1.forward(100)#往前走
pen1.end_fill()# pen1.end_fill()#停止
pen1.hideturtle()# pen1.hideturtle()#隐藏pen1
turtle.done()# turtle.done()#保存画布
\ No newline at end of file \ 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