Commit acdff262 by BellCodeEditor

save project

parent 623fb1a6
Showing with 21 additions and 0 deletions
""" """
请使用turtle模块画出五角星 请使用turtle模块画出五角星
""" """
# 导入turtle库
import turtle
# 设置画笔
my_pen = turtle.Pen()
# 改变画笔的形状
my_pen.shape("turtle")
# 设置填充颜色
my_pen.fillcolor("red")
# 开始填充
my_pen.begin_fill()
# 循环画图
for i in range(5):
my_pen.forward(200)
my_pen.right(144)
# 结束填充
my_pen.end_fill()
# 隐藏画笔
my_pen.hideturtle()
# 保存画布
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