Commit Graph

3 Commits

Author SHA1 Message Date
Christian Clauss
cecf43d648
Pyupgrade to Python 3.9 (#4718)
* Pyupgrade to Python 3.9

* updating DIRECTORY.md

Co-authored-by: github-actions <${GITHUB_ACTOR}@users.noreply.github.com>
2021-09-07 13:37:03 +02:00
Christian Clauss
46e56fa6f2
luhn.py: Favor list comprehensions over maps (#4663)
* luhn.py: Favor list comprehensions over maps

As discussed in CONTRIBUTING.md.

* updating DIRECTORY.md

Co-authored-by: github-actions <${GITHUB_ACTOR}@users.noreply.github.com>
2021-08-27 11:45:14 +02:00
QuantumNovice
95a4957d9e
Luhn algorithm (#4487)
* Luhn algorithm

Perform Luhn validation on input string
    Algorithm:
    * Double every other digit starting from 2nd last digit.
    * Subtract 9 if number is greater than 9.
    * Sum the numbers
https://en.wikipedia.org/wiki/Luhn_algorithm

* Update DIRECTORY.md

* Update luhn.py

* Update luhn.py

* Update luhn.py

* Update luhn.py

* Update DIRECTORY.md
2021-06-13 23:49:44 +05:30