Commit dfbf66cd by BellCodeEditor

save project

parent 428b5798
Showing with 1725 additions and 8 deletions
"""
请使用turtle模块画出五角星
"""
import turtle
pen=turtle.Pen()
import turtle #导入绘画模块
pen=turtle.Pen() #变量赋值,表示画笔
pen.fillcolor("red")
pen.begin_fill()
for i in range (6):
pen.forward(200)
pen.right(60)
pen.begin_fill() #开始填充
for i in range (5):
pen.forward(200) #画笔(之前设置的变量)移动,旋转
pen.right(144)
pen.hideturtle()
pen.end_fill()
turtle.done()
pen.end_fill() #结束填充
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