1.五角星绘制

import turtle
turtle.pensize(1)
turtle.pencolor("black") #画笔黑色
turtle.fillcolor("red") #内部填充红色
#绘制五角星#
turtle.begin_fill()
for _ in range(5): #重复执行5次
    turtle.forward(150) #向前移动150步
    turtle.right(144)  #向右移动144度
turtle.end_fill() #结束填充红色

 

posted @ 2020-03-15 11:00  aoimo  阅读(97)  评论(0编辑  收藏  举报