On 09/12/13 22:28, Dave Angel wrote:
On Mon, 09 Dec 2013 20:27:38 +0000, Alan Gauld
<alan.ga...@btinternet.com> wrote:
Incidentally, I just remembered another completely different
way to do it, although I can't recall how it works!
Unfortunately it doesn't work for 10, 20, ...
Ah, I knew it must be too good to be true :-)
This is related to a technique called casting out nines (and nine is
magic because it's one less than the base we work in).
OK, Thanks for the pointer.
I still have no idea how I knew about that technique but it just
appeared, fully formed, in my brain. Bizarro!
--
Alan G
Author of the Learn to Program web site
http://www.alan-g.me.uk/
http://www.flickr.com/photos/alangauldphotos
_______________________________________________
Tutor maillist - Tutor@python.org
To unsubscribe or change subscription options:
https://mail.python.org/mailman/listinfo/tutor