i want the stars to appear in the night, but it only come out one?? can anyone help me what i should do to make about 50 stars randomly appear in the night?? thank you so much!
from graphics import *
import random
def stars(x,y):
'''draw white line representing one stars of the night.'''
stars=Line(Point(x,y), Point(x,y))
stars.setOutline("white")
stars.setFill("white")
for i in range(50):
'''stars shining in the night.'''
x=random.randrange(60,190)
y=random.randrange(310,900)
s= Line(Point(140, 160), Point(60, 140))
s1= Line(Point(60, 140), Point(140, 140))
s2= Line(Point(140, 140), Point(60, 160))
s3 = Line(Point(100,120), Point(60,160))
s4 = Line(Point(100,120), Point(140,160))
s.setFill('white')
s.draw(win)
s1.setFill('white')
s1.draw(win)
s2.setFill('white')
s2.draw(win)
s3.setFill('white')
s3.draw(win)
s4.setFill('white')
s4.draw(win)