python——五角星绘制

#五角星
import turtle

turtle.pensize(5)
turtle.pencolor('yellow')
turtle.fillcolor('red')

turtle.begin_fill()
for i in range(5):
    turtle.forward(100)
    turtle.right(144)
    turtle.forward(100)
    turtle.left(72)
turtle.end_fill()

turtle.hideturtle()
turtle.done()
发布了11 篇原创文章 · 获赞 1 · 访问量 679

猜你喜欢

转载自blog.csdn.net/Otis_98/article/details/105184325
今日推荐