[Edu-sig] Re: Rational Division

Gordon Worley orla_redbird@crosswinds.net
Wed, 9 Feb 2000 22:03:30 -0500

This isn't really a problem.  It's just a lack of knowledge about syntax.
It's not intuitive (because they don't teach it this way in school), but it
makes sense once you know about it.  Oh yeah, here's it (taken from a
Python interpreter session):

>>> 2/3 #returns number of times can be divided into
>>> 2%3 #modulus, returns remainder
>>> 2.0/3.0 #decimals make them floats

As you can see, there is a way to do all the behaviors that might be
expected, it just takes an appropriate knowledge of the syntax to do it.
Just as it is necessary to know the syntax for control statements, it is
also necessary to know the proper syntax for preforming basic arithmetic.

- Gordon Worley