Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Card number validation #1011

Open
MichalMarsalek opened this issue Sep 23, 2023 · 1 comment
Open

Card number validation #1011

MichalMarsalek opened this issue Sep 23, 2023 · 1 comment
Labels
hole-idea An idea for a new hole. idea

Comments

@MichalMarsalek
Copy link
Collaborator

MichalMarsalek commented Sep 23, 2023

Description
Given a list of payment card numbers, output valid if it passes the Luhn check and invalid otherwise.

Example input

4242 4242 4242 4242
4242 4244 4242 4242
5555 5555 5555 4444
5555 5555 5555 5444
3566 0020 2036 0505
3656 0020 2036 0505

Example output

valid
invalid
valid
invalid
valid
invalid

We might stick to the most common 16 digit card numbers, or we might allow any length.

@MichalMarsalek MichalMarsalek added idea hole-idea An idea for a new hole. labels Sep 23, 2023
@kg583
Copy link
Contributor

kg583 commented Sep 23, 2023

Maybe we just output the valid ones like in Pangram Grep? Choosing specific strings to represent booleans feels out of spirit for this site.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
hole-idea An idea for a new hole. idea
Projects
None yet
Development

No branches or pull requests

2 participants