Commit 9382690a by BellCodeEditor

save project

parent a448647f
Showing with 24 additions and 0 deletions
# 利用write()帮助悟空给诺依回信吧~
import turtle #导入turtle模块
s=turtle.Screen() #新建画布
s.bgcolor("pink")#改变画布的背景颜色
A=turtle.Pen()#新建画笔
A.penup()
A.goto(100,-100)#移动到要写字的位置
A.write("静夜思\n唐[李白]\n床前明月光\n疑是地上霜",font=("STKAITI",17,"normal"))#写字
#写字("要写的内容"),字体变量=("字体名称",字体大小,"字体类型")
A.hideturtle()#隐藏画笔
a=turtle.Pen()#新建画笔
a.pensize(3)#设置画笔粗细
a.pencolor("red")
a.left(45)
a.forward(100)
a.circle(50,180)
#画圆(半径,旋转度数,旋转角度) 180°表示半圆
a.right(90)
a.circle(50,180)
a.forward(100)
a.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