Integers with leading zeroes

Chris Angelico rosuav at gmail.com
Fri Jul 24 08:28:47 CEST 2015


On Fri, Jul 24, 2015 at 4:23 PM, Gregory Ewing
<greg.ewing at canterbury.ac.nz> wrote:
> Michael Torrie wrote:
>>
>> A credit card number is indeed a number, and there are
>> mathematical formulas for determining if a particular number is a valid
>> (as in well-formed) credit card number,
>
>
> If you're talking about the check-digit algorithm,
> that doesn't treat the whole number as an integer,
> it works on the individual digits:
>
> http://www.datagenetics.com/blog/july42013/
>
>> and possibly to identify what kind of card it is.
>
>
> That's determined by the leading digits, and can
> be done just as well by treating them as characters.

So, the definition of a number is: Something on which you perform
numeric operations. Aside from being circular, wouldn't this mean that
"rope" is a number, since its square root is string?

ChrisA


More information about the Python-list mailing list