Computer Science, asked by harsh12012001, 20 days ago

Q2. Credit card numbers follow certain patterns: It must have between 13 and 16 digits,
and the number must start with:
4 for Visa cards
5 for MasterCard credit cards
37 for American Express cards
6 for Discover cards
Credit card numbers are generated following this validity check, commonly known as the
Luhn check or the Mod 10 check, which can be described as follows (for illustration,
consider the card number 4388576018402626)
i.
Double every second digit from right to left. If doubling of a digit results in a two-digit
number, add up the two digits to get a single-digit number.
4 3 8 8 5 7 6 0 1 8 4 0 2 6 2 6
6
> 2 2 = 4
= 2 2 = 4
4 2 = 8
1*2 = 2
6*2 = 12 (1 + 2 = 3)
5 2 = 10 (1 + 0 = 1)
8 2 = 16 (1 + 6 = 7)
4*2 = 8

use python​

Answers

Answered by study12345677890
0

Answer:

Credit card numbers follow certain patterns: It must have between 13 and 16 digits,

and the number must start with:

4 for Visa cards

5 for MasterCard credit cards

37 for American Express cards

6 for Discover cards

Credit card numbers are generated following this validity check, commonly known as the

Luhn check or the Mod 10 check, which can be described as follows (for illustration,

consider the card number 4388576018402626)

i.

Double every second digit from right to left. If doubling of a digit results in a two-digit

number, add up the two digits to get a single-digit number.

4 3 8 8 5 7 6 0 1 8 4 0 2 6 2 6

6

> 2 2 = 4

= 2 2 = 4

4 2 = 8

1*2 = 2

6*2 = 12 (1 + 2 = 3)

5 2 = 10 (1 + 0 = 1)

8 2 = 16 (1 + 6 = 7)

4*2 = 8

use python

Similar questions