import turtle,random
t = turtle
t.bgcolor('brown')
colors = ["red","yellow","green","blue","orange","purple"]
def drawStar(x, y, r, color):
t.up()
t.color(color)
#turtle.pensize(5)
t.goto(x,y)
t.down()
for i in range(6):
t.forward(r)
t.right(144)
count =0
x = -300
while count<50:
x = x+10
y = random.randint(-100,200)
r = random.randint(10,35)
n = random.randint(0,5) #颜色随机
drawStar(x, y, r, colors[n])
count = count+1
t.up()
t.goto(300,-120)
t.color("red")
t.pensize(100)
t.down()
t.write("@SB")
t.hideturtle()
turtle.done()