Luhn Algorithm

Project Description

Luhn Algorithm - checks if credit card number is valid or not.  it reverses the original digits into a list, creates a list of numbers from1 to length of card number, zips them together sich that each item is a [digit, counter], then using map, each digit is multiplied by 1 if counter is odd or 2 if counter is even, with each product reduced to 1 digit,  if the sum of numbers ends in zero, the card number is valid.

Created April 26, 2024

Last updated April 26, 2024

Published April 26, 2024