Commit 1a0f76c0 by BellCodeEditor

save project

parent f83c6288
Showing with 8 additions and 0 deletions
...@@ -3,10 +3,17 @@ import turtle ...@@ -3,10 +3,17 @@ import turtle
#创建画笔turtle #创建画笔turtle
pen = turtle.Pen() pen = turtle.Pen()
#设置填充颜色
pen.fillcolor("red") pen.fillcolor("red")
#设置开始填充的位置
pen.begin_fill() pen.begin_fill()
#画出五角星
for i in range(5): for i in range(5):
pen.forward(200) pen.forward(200)
pen.right(144) pen.right(144)
#设置结束的填充位置
pen.end_fill() pen.end_fill()
#隐藏turtle
pen.hideturtle()
#画布
turtle.done() 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