for循环:用turtle画一颗五角星

import turtle
turtle.setup(800,400,0,0)
turtle.bgcolor('purple')
 
turtle.color("blue")
turtle.fillcolor("red")
turtle.begin_fill()
 
for i in range(5):
 
    turtle.forward(50)
 
    turtle.right(144)
 
turtle.end_fill()
 
turtle.done()

posted on 2018-05-09 20:17  苏俊康  阅读(119)  评论(0编辑  收藏  举报