Can anyone help me modify the code so the ball starts in random directions

Rick Johnson rantingrickjohnson at gmail.com
Fri Dec 11 19:51:38 EST 2015


On Friday, December 11, 2015 at 5:20:13 PM UTC-6, phamt... at gmail.com wrote:
> Can anyone direct me in the direction where to start the code for the randomized of the  ball  to start.

No, because your problem needs to be simplified first. A good first step would be to create a new script that only displays a canvas and draws an oval at a random spot when a button is pressed (or some other easy interface method) Once you can reliably create random ovals on command, only then do you want to work that code into the larger program. 

The stdlib has a module for creating random numbers and ranges. 



More information about the Python-list mailing list