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

Luhn odd numbers of digits not starting with 0 #1701

Closed
wants to merge 1 commit into from

Conversation

anti-fun
Copy link

@anti-fun anti-fun commented Jul 3, 2023

Yesterday I submitted some code to the Luhn exercise that I later realized was broken. For cases where there were an odd number of input digits, I was discarding the first digit. Unfortunately, all the test inputs with an odd number of digits currently start with 0, so my code passed despite not implementing the algorithm correctly.

This PR adds two tests that will fail if the implementer makes the same mistake I did.

@github-actions
Copy link
Contributor

github-actions bot commented Jul 3, 2023

Hello. Thanks for opening a PR on Exercism. We are currently in a phase of our journey where we have paused community contributions to allow us to take a breather and redesign our community model. You can learn more in this blog post. As such, all issues and PRs in this repository are being automatically closed.

That doesn't mean we're not interested in your ideas, or that if you're stuck on something we don't want to help. The best place to discuss things is with our community on the Exercism Community Forum. You can use this link to copy this into a new topic there.


Note: If this PR has been pre-approved, please link back to this PR on the forum thread and a maintainer or staff member will reopen it.

@github-actions github-actions bot closed this Jul 3, 2023
@MatthijsBlom
Copy link

MatthijsBlom commented Jul 4, 2023

It looks to me like the canonical data already cover these cases. Do you agree?

If so, then the problem you encountered could be fixed by (re)synchronizing the track with the canonical data.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants