This repository is purely for reference and is illustrative in it is purpose. This is one of the many ways of implementing this algorithm.
This project illustrates an implementation of the Luhn Algorithm in Python. The Luhn Algorithm is the standard method of validating a credit card number prior to authorization. It is also an interesting algorithm as it teaches a lot of the basics and nuances of a language through implementation.
Before you continue, ensure you have met the following requirements:
- Python 3 installed
- PyTest installed (to run the unit tests if need be)
- Issue from the command line pytest
- This repository is heavily commented to provide context as to what and why, if in VS Code feel free to collapse all comments if they are obtrusive
- On Mac -> Press ⌘ + K then ⌘ + /
- On Windows & Linux -> Press Ctrl + K then Ctrl + /
- The checkdigits validated are from various sites across the web, there will be more added and augmentation of the algorithm when edge cases are found.