Answer:
import simplegui
import random
def draw_handler(canvas):
for x in range(1000):
colorList = ["Yellow", "Red", "Purple", "White", "Green", "Blue", "Pink", "Orange"]
c = random.choice(colorList)
x = random.randint(1,600)
y = random.randint(1,600)
canvas.draw_point([x, y], c)
frame = simplegui.create_frame('Testing', 600, 600)
frame.set_canvas_background("Black")
frame.set_draw_handler(draw_handler)
frame.start()
Explanation:
I used a for loop, setting my range to 1000 which is how you create exactly 1000 points. Next, I defined my color array, my x randint value, and my y randint value. I set both the x and y randint values to 1 - 600 since the frame is 600x600. The rest is pretty self explanatory.