Commit baeaca10 by BellCodeEditor

auto save

parent b20fddb6
Showing with 22 additions and 7 deletions
# 导入库
import turtle
pen = turtle.Pen()
pen.fillcolor("red")
pen.begin_fill()
# 创建画笔
p = turtle.Pen()
# 控制画笔颜色
p.color("red")
# 填充颜色
p.fillcolor("red")
# 开始填充
p.begin_fill()
# 创建循环
for i in range(5):
pen.forward(200)
pen.left(144)
pen.hideturtle()
pen.end_fill()
# 控制画笔移动
p.forward(100)
# 控制画笔方向
p.left(144)
# 结束颜色填充
p.end_fill()
# 隐藏画笔
p.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