Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > comp.lang.python > #28702

Re: Division help in python

From Serhiy Storchaka <storchaka@gmail.com>
Subject Re: Division help in python
Date 2012-09-07 21:17 +0300
References <CAB2OTpf290sL8kncrVADr-YD1hvUP=R424C8xd+BGGivF5AdhA@mail.gmail.com>
Newsgroups comp.lang.python
Message-ID <mailman.365.1347041889.27098.python-list@python.org> (permalink)

Show all headers | View raw


On 07.09.12 15:53, Ramyasri Dodla wrote:
> I am brand new to python. checking over basic stuff. I came across the 
> problem while doing so. If any body aware of the problem, kindly respond me.
> 
>  >>> 5/10
> 0
>  >>> - 5/10
> -1
> 
> The second case also should yield a 'zero' but it is giving a -1

http://python-history.blogspot.com/2010/08/why-pythons-integer-division-floors.html

Back to comp.lang.python | Previous | Next | Find similar | Unroll thread


Thread

Re: Division help in python Serhiy Storchaka <storchaka@gmail.com> - 2012-09-07 21:17 +0300

csiph-web