[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
0
>>> 2%3 #modulus, returns remainder
2
>>> 2.0/3.0 #decimals make them floats
0.666666666667

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
http://www.crosswinds.net/~orla_redbird/
mailto:orla_redbird@crosswinds.net