Tony Meyer wrote:
Dividing two integers will give you an integer (truncated) result:
If you want '1/2' to give you 0.5 (throughout your script), you can do:
from __future__ import division
Notice that '//' (with or without the from __future__ import) will give you
the integer result.
or more simply, divide by 4.0 for rod and bore: (rod**2/4.0)
what happens if rodarea is bigger than area?
_______________________________________________
Tutor maillist - Tutor@python.org
http://mail.python.org/mailman/listinfo/tutor