NEWB: dividing numbers

Daniel Dalton d.dalton at
Mon Mar 9 05:03:41 CET 2009


On Mon, Mar 09, 2009 at 12:08:16AM +0100, Lo wrote:
> I just tried python first time.
> 2/3
> the result is zero

That's because your dividing an int by an int to an int. The definition
of an int is a "whole number". So just use floating point I think it's
called, this should work, and does just tested with the python
interactive shell:


More information about the Python-list mailing list