Commit a22e6c7e by BellCodeEditor

save project

parent 7fd0f0f5
Showing with 3 additions and 1 deletions
...@@ -4,6 +4,8 @@ import turtle ...@@ -4,6 +4,8 @@ import turtle
p = turtle.pen() p = turtle.pen()
# 设置填充的颜色 # 设置填充的颜色
p.fillcolor("red") p.fillcolor("red")
# 改变画笔颜色
p.color("red")
# 开始填充颜色 # 开始填充颜色
p.begin_fill() p.begin_fill()
# 画五角星 # 画五角星
...@@ -12,5 +14,5 @@ for i in range(5): ...@@ -12,5 +14,5 @@ for i in range(5):
p.right(144) p.right(144)
# 结束填充颜色 # 结束填充颜色
p.end_fill() p.end_fill()
p.hideturtle()
turtle.done() 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