Michael Sullivan wrote:
random.seed(time) sets the seed to the same value each time. (You are passing a module object, whose ID becomes the seed). Try random.seed(time.time()). Also you can set the seed once, then let each call to uniform get the next "random" number.OK. I've got it working this far. Now I want the script to generate eight pieces, each with a random colour. Here's my current code: Also consider: mypiece = [] for piececount in range(8): mypiece.append(LinePuzzlePiece()) mypiece[piececount].printcolor() -- Bob Gailer 510-978-4454 Broadband Phone Service for local and long distance $19.95/mo plus 1 mo Free |
_______________________________________________ Tutor maillist - [email protected] http://mail.python.org/mailman/listinfo/tutor
