Decoders · difficulty 2 of 3
Card number checker (Luhn) 💳
Every card number passes the Luhn test: from the right, double every second digit (subtract 9 if over 9), sum everything, valid if divisible by 10. Print True or False for each number.
Write it in the browser and press run. Real Python, checked against the expected output, no account needed.
Skills: strings, dicts, regex