Luhn test of credit card numbers: Difference between revisions

Content added Content deleted
(New task and Python solution.)
 
(C.f. SEDOL)
Line 26: Line 26:
s1 + s2 = 70 which ends in zero which means that 49927398716 passes the Luhn test</pre>
s1 + s2 = 70 which ends in zero which means that 49927398716 passes the Luhn test</pre>


The task is to write a function/method/procedure/subroutine that will validate a number with the Luhn test, and use it to validate the following numbers:
The task is to '''write a function/method/procedure/subroutine that will validate a number with the Luhn test, and use it to validate the following numbers:'''
:49927398716
:49927398716
:49927398717
:49927398717
:1234567812345678
:1234567812345678
:1234567812345670
:1234567812345670
<br>

C.f. [[SEDOLs|SEDOL]]


=={{header|Python}}==
=={{header|Python}}==