[Tutor] A better way for greatest common divisor

Richard D. Moores rdmoores at gmail.com
Sat Jul 31 12:44:29 CEST 2010


>> On Sat, 31 Jul 2010 01:03:27 pm David Hutto wrote:

> There is a difference between defining a function as a singular
> activity needed to be performed, and a function that serves as a tool,
> that asks for input and output, as well as serves several
> utilizations, e.g., it not only accepts the numerator/denominator, but
> spits out the gcd, the reduced, and the whole numeber reduced if the
> numerator is greater. but if they are even, will come with a little if
> num == den boolean, when I'm finished .

Of course you can do as you wish, but how about breaking up that
function as Steven suggests, and using the script, the module that
contains them as the tool you desired?

Dick


More information about the Tutor mailing list