You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
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.
The text was updated successfully, but these errors were encountered:
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.
The text was updated successfully, but these errors were encountered: