Re: [Tutor] LCM revisited + OOP

2012-11-27 Thread wrw
On Nov 27, 2012, at 8:13 PM, Ray Jones wrote: > > Part I > I am a good way through MIT's Introduction to Computer Science and > Programming as offered through edX. I'm not certain I'm going to pass > the course this first time through, the major hangup being the > understanding of OOP. > > Part

Re: [Tutor] LCM revisited + OOP

2012-11-27 Thread Ray Jones
On 11/27/2012 07:27 PM, Steven D'Aprano wrote: > For something as simple as Least Common Multiple? Using a function is > much more sensible than writing a class. > > OOP is for when you have a single data type that needs *state* and > *behaviour*. A LCM function only has behaviour, and so a func

Re: [Tutor] LCM revisited + OOP

2012-11-27 Thread Steven D'Aprano
On Tue, Nov 27, 2012 at 06:13:52PM -0700, Ray Jones wrote: > Part I > I am a good way through MIT's Introduction to Computer Science and > Programming as offered through edX. I'm not certain I'm going to pass > the course this first time through, the major hangup being the > understanding of OOP.

[Tutor] LCM revisited + OOP

2012-11-27 Thread Ray Jones
Part I I am a good way through MIT's Introduction to Computer Science and Programming as offered through edX. I'm not certain I'm going to pass the course this first time through, the major hangup being the understanding of OOP. Part II When the LCM thread came through, I wrote some quick code do