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


Groups > comp.lang.python > #65970 > unrolled thread

Simple % question

Started byScott W Dunning <swdunning@cox.net>
First post2014-02-11 18:06 -0700
Last post2014-02-11 18:16 -0800
Articles 2 — 2 participants

Back to article view | Back to comp.lang.python


Contents

  Simple % question Scott W Dunning <swdunning@cox.net> - 2014-02-11 18:06 -0700
    Re: Simple % question Rustom Mody <rustompmody@gmail.com> - 2014-02-11 18:16 -0800

#65970 — Simple % question

FromScott W Dunning <swdunning@cox.net>
Date2014-02-11 18:06 -0700
SubjectSimple % question
Message-ID<mailman.6709.1392167188.18130.python-list@python.org>
I just have a simple question.  I don’t understand why 1%10  = 1?

[toc] | [next] | [standalone]


#65983

FromRustom Mody <rustompmody@gmail.com>
Date2014-02-11 18:16 -0800
Message-ID<ab40fb17-aff0-4a4a-8c21-d57044a221be@googlegroups.com>
In reply to#65970
On Wednesday, February 12, 2014 6:36:17 AM UTC+5:30, Scott W Dunning wrote:
> I just have a simple question.  I don't understand why 1%10  = 1?

This is not really about python. See
http://en.wikipedia.org/wiki/Euclidean_division

Particularly the examples section and note that when you divide a by b you get a 
quotient -- q and remainder -- r.  In your case a is 1 b is 10.
Now see that wikipedia page

[toc] | [prev] | [standalone]


Back to top | Article view | comp.lang.python


csiph-web