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


Groups > comp.lang.python > #28702

Re: Division help in python

Path csiph.com!usenet.pasdenom.info!gegeweb.org!de-l.enfer-du-nord.net!feeder1.enfer-du-nord.net!newsfeed.eweka.nl!eweka.nl!feeder3.eweka.nl!newsfeed.xs4all.nl!newsfeed6.news.xs4all.nl!xs4all!post.news.xs4all.nl!not-for-mail
Return-Path <python-python-list@m.gmane.org>
X-Original-To python-list@python.org
Delivered-To python-list@mail.python.org
X-Spam-Status OK 0.002
X-Spam-Evidence '*H*': 1.00; '*S*': 0.00; 'python.': 0.02; 'subject:help': 0.07; 'received:80.91': 0.09; 'received:80.91.229': 0.09; 'received:gmane.org': 0.09; 'received:list': 0.09; 'subject:python': 0.11; 'received:80.91.229.3': 0.16; 'received:plane.gmane.org': 0.16; 'stuff.': 0.16; 'wrote:': 0.17; 'yield': 0.17; '>>>': 0.18; 'second': 0.24; 'so.': 0.24; 'header:In-Reply-To:1': 0.25; 'header :User-Agent:1': 0.26; 'checking': 0.27; 'header:X-Complaints- To:1': 0.28; 'basic': 0.30; 'problem': 0.33; 'to:addr:python- list': 0.33; 'problem,': 0.35; 'doing': 0.35; 'received:org': 0.36; 'but': 0.36; 'should': 0.36; 'subject:: ': 0.38; 'to:addr:python.org': 0.39; 'header:Received:5': 0.40; 'url:blogspot': 0.64; 'kindly': 0.67; 'brand': 0.78
X-Injected-Via-Gmane http://gmane.org/
To python-list@python.org
From Serhiy Storchaka <storchaka@gmail.com>
Subject Re: Division help in python
Date Fri, 07 Sep 2012 21:17:40 +0300
References <CAB2OTpf290sL8kncrVADr-YD1hvUP=R424C8xd+BGGivF5AdhA@mail.gmail.com>
Mime-Version 1.0
Content-Type text/plain; charset=ISO-8859-1
Content-Transfer-Encoding 7bit
X-Gmane-NNTP-Posting-Host 37.115.182.104
User-Agent Mozilla/5.0 (X11; Linux i686; rv:15.0) Gecko/20120827 Thunderbird/15.0
In-Reply-To <CAB2OTpf290sL8kncrVADr-YD1hvUP=R424C8xd+BGGivF5AdhA@mail.gmail.com>
X-BeenThere python-list@python.org
X-Mailman-Version 2.1.15
Precedence list
List-Id General discussion list for the Python programming language <python-list.python.org>
List-Unsubscribe <http://mail.python.org/mailman/options/python-list>, <mailto:python-list-request@python.org?subject=unsubscribe>
List-Archive <http://mail.python.org/pipermail/python-list/>
List-Post <mailto:python-list@python.org>
List-Help <mailto:python-list-request@python.org?subject=help>
List-Subscribe <http://mail.python.org/mailman/listinfo/python-list>, <mailto:python-list-request@python.org?subject=subscribe>
Newsgroups comp.lang.python
Message-ID <mailman.365.1347041889.27098.python-list@python.org> (permalink)
Lines 14
NNTP-Posting-Host 2001:888:2000:d::a6
X-Trace 1347041889 news.xs4all.nl 6855 [2001:888:2000:d::a6]:38429
X-Complaints-To abuse@xs4all.nl
Xref csiph.com comp.lang.python:28702

Show key headers only | 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