Question: Please answer using python: .Luhn formula for credit card number validation A credit card number is a string of 16 digits (example: 4499 2739 8716
Please answer using python:

.Luhn formula for credit card number validation A credit card number is a string of 16 digits (example: 4499 2739 8716 4395) We take the sum of the digits at even indices (from right to leff) (9+4+1 +8+3+2+9+4-40) and double it: 80 We take the sum of the digits at odd indices (from right to leff) (5+3+6+7+9+7+9+4 50) Sum of both the previous sums needs to be divisible by 10 for the credit card number to be valid Write a program to check if the given credit card number is valid or not
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
