Hello all I am very very new to programming & Python. My problem is I cannot figure out how to create a line consisting of random colored pixels. I know how to create a white or red line but how to make the colors random is beyond me. This is my white line..Im pretty sure I have to import random somewhere but not too sure??
from cImage import *
myImWin = ImageWin("Line Image" ,300,300)
lineImage = EmptyImage(300,300)
PILPixel = Pixel(255,255,255)
for i in range(300):
lineImage.setPixel(i,i,whitePixel)
lineImage.draw(myImWin)
Any assistance would be greatly appreciated.