Why Python don't accept 03 as a number?

Chris Angelico rosuav at gmail.com
Mon Dec 10 05:16:46 EST 2018


On Mon, Dec 10, 2018 at 9:11 PM Antoon Pardon <antoon.pardon at vub.be> wrote:
>
> On 10/12/18 11:03, Chris Angelico wrote:
> > Considering that, in a problem of that description, neither S nor M
> > may represent zero, I don't think there's a problem here.
>
> Not all such problems have that condition.

They should. Every published set of problems that I've ever solved by
hand has. I went searching online for some, and found this page:

http://puzzlepicnic.com/genre?alphametic

which clearly states that exact restriction. The implication is that
you're solving a puzzle in arithmetic (usually addition or long
multiplication), and it is *exactly* as you would have written it with
digits, save that the digits have been replaced with letters (and
carries have been omitted, since that'd make it too easy). You
wouldn't write a leading zero on a number in standard grade-school
arithmetic, so you also won't use a leading zero in anything here.

ChrisA



More information about the Python-list mailing list