NEWB: dividing numbers
clp2 at rebertia.com
Mon Mar 9 00:21:12 CET 2009
On Sun, Mar 8, 2009 at 3:08 PM, Lo <graga at congstar.de> wrote:
> I just tried python first time.
> the result is zero
> I want the result to be .333...
> How do I get this?
Add the following to the top of your program:
from __future__ import division
That tells Python to use the proper kind of division, which is now the
default in Python 3.0.
I have a blog:
More information about the Python-list