from turtle import * from random import * speed ( 10 ) colormode ( 255 ) penup () goto ( - 175 , 200 ) pendown () #画一个五角星 for x in range ( 8 ): for j in range ( 5 ): right ( 90 ) r = randint ( 0 , 255 ) g = randint ( 0 , 255 ) b
from random import *
speed(10)
colormode(255)
penup()
goto(-175,200)
pendown()
#画一个五角星
for x in range(8):
for j in range(5):
right(90)
r = randint(0, 255)
g = randint(0, 255)
b = randint(0, 255)
color((r, g, b))
begin_fill()
for i in range(5):
fd(50)
right(144)
end_fill()
penup()
left(90)
fd(80)
pendown()
penup()
goto(-175, 200-(x+1)*80)
pendown()
input()