#!/usr/bin/env python from simpleGraphicsE import * from random import randint as randi from random import uniform as randu # n is the window size and r is the radius of the paint ball n = 10 r = .5 MakeWindow(n,bgcolor=BLACK,labels=True) for k in range(500): # Throw the k-th paint ball x = randu(-n,n) y = randu(-n,n) # Color it Magenta, Cyan or Blue with equal probability rc = randi(1,3) if rc%3==0: c = MAGENTA elif rc%3==1: c = CYAN else: c = BLUE DrawDisk(x,y,r,color=c) ShowWindow()