import turtle
# 颜色 color
turtle.color('blue')
# 宽度 width 笔的尺寸 pensize
turtle.width(8)
# 形状 shape
turtle.shape('turtle')
# 填充颜色 fillcolor
turtle.fillcolor('yellow')
# 告诉电脑开始填充 begin_fill
turtle.begin_fill()
turtle.fd(100)
turtle.lt(144)
turtle.fd(100)
turtle.lt(144)
turtle.fd(100)
turtle.lt(144)
turtle.fd(100)
turtle.lt(144)
turtle.fd(100)
turtle.lt(144)
# 结束 end_fill
turtle.end_fill()
# 抬笔 up
turtle.up()
turtle.goto(-200,200)
# 落笔 down
turtle.down()
# 圆 circle
turtle.circle(50)
turtle.color('pink')
turtle.up()
turtle.goto(200,-200)
# 落笔 down
turtle.down()
# write font
turtle.write('鸡你太美',font=(None,100))
turtle.done()
jiayu -turtle画画的各种功能
最新推荐文章于 2024-02-29 13:40:42 发布