[Tutor] a pyball python app

Kent Johnson kent37 at tds.net
Thu Apr 3 16:16:37 CEST 2008


dean garrad wrote:
> i kind of understood what you were saying but not sure how to go by this 
> i am still new to python script and learning it as much as i can.

OK. Do you understand how the current script works? If not, what parts 
are confusing?

Do you understand object-oriented programming at all (classes)? If not, 
you should probably read some tutorials and get at least a basic 
understanding.

You could add another ball by brute-force copying of lots of code, or by 
making a list of (location, speed) values for each ball, but the code 
will end up simpler and easier to understand if you use a class to hold 
the parameters for the ball.

Kent


More information about the Tutor mailing list