Commit dfbf66cd by BellCodeEditor

save project

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