Mathematics
Mathematics, 22.07.2019 02:01, mak92

Supposed a visa card had a credit card number of 4162 0012 3456789a where a is the check number what is the check number? a) 0 b) 3 c) 9 d) 7

answer
Answers: 1

Similar questions

Предмет
Geography, 25.07.2019 01:30, huangjianhe135
Question 3 (15% of this assignment): (financial: credit card number validation) 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 in 1954, hans luhn of ibm proposed an algorithm for validating credit card numbers. the algorithm is useful to determine whether a card number is entered correctly or whether a credit card is scanned correctly by a scanner. 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): 1. double every second digit from right to left. if doubling of a digit results in a twodigit number, add up the two digits to get a single-digit number. 4388576018402626 2 = 4 2 = 4 4* 2 = 8 * 2 = 2 6 * 2 = 12 (1 + 2 = 3) 5* 2 = 10 (1 + 0 = 1) 8 * 2 = 16 (1 + 6 = 7) 4 * 2 = 8 2. now add all single-digit numbers from step 1. 4 + 4 + 8 + 2+ 3+ 1 + 7 + 8 = 37 3. add all digits in the odd places from right to left in the card number. 6 + 6 + 0 + 8 + 0 + 7 + 8 + 3 = 38 4. sum the results from steps 2 and 3. 37 + 38 = 75 5. if the result from step 4 is divisible by 10, the card number is valid; otherwise, it is invalid. for example, the number 4388576018402626 is invalid, but the number 4388576018410707 is valid. write a program that prompts the user to enter a credit card number as an integer. display whether the number is valid or invalid. design your program to use the following functions: # return true if the card number is valid def isvalid (number): # get the result from step 2 def sumofdouble evenplace (number): # return this number if it is a single digit, otherwise, return # the sum of the two digits def getdigit(number): # return sum of odd place digits in number def sumo foddplace (number):
Answers: 1
Do you know the correct answer?
Supposed a visa card had a credit card number of 4162 0012 3456789a where a is the check number what...

Questions in other subjects:

Konu
Arts, 03.10.2019 01:30
Konu
Mathematics, 03.10.2019 01:30