python 多颜色五角星练习

#Five.star

import turtle

import: randon
turtle. setup(360,300)

turtle. colormode(255)


turtle. bgcolor (random. randrange (0, 255), random. randrange (0, 255), random. randrange(0,255)

turtle.up()
turtle.goto(-100,50)
turtle.down
turtle. pensize (5)
turtle. begin_fill()

turtle. fillcotor(random. randrange (0, 255),random. randrange (0, 255),random. randrange(0, 255)
for  i in range(5):
turtle peneoior frandom. randrange (0, 255), random. randrange (0. 255), random. randrango (0,255)

        turtle. fd(268)
        turtle.right(144)

turtle.end_fiii()

turtle.hideturtle()

turtle.done ()

python 多颜色五角星练习_第1张图片

python 多颜色五角星练习_第2张图片

 

你可能感兴趣的:(python,开发语言)