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

CS50P: NUMB3RS allows leading zeroes #260

Open
Makaze opened this issue Jul 20, 2024 · 0 comments
Open

CS50P: NUMB3RS allows leading zeroes #260

Makaze opened this issue Jul 20, 2024 · 0 comments
Assignees

Comments

@Makaze
Copy link

Makaze commented Jul 20, 2024

The error: When a student declares a test for a case with the correct number of digits but disallowing leading zeroes, e.g. by not allowing 025, check50 says the correct version fails the tests.

The student is arguably correct. Leading zeroes are generally not allowed in correct IP address notation.

If this were intentional by the course, I would expect it to be in the specification and for there to be a check50 test case to make sure the student's validator function allows it. However, there is no such test case by CS50. A submission that does not allow leading zeroes will pass check50 as well as one that does.

Due to these inconsistencies, it seems to be a missed edge case.

Suggested solution: Make the correct solution used by CS50 check for and disallow leading zeroes.

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

No branches or pull requests

3 participants