Ad
  • Default User Avatar
  • Default User Avatar

    ok, took a look at someone else's thread below and discovered it's a newline issue.

    This is a rank 7 kata. Lots of folks are gonna come across this who are just learning to code. You're setting a ton of people up for failure here with this trick.

    I can take being a dummy for a sec, I've been coding for a while. But for other folks, highly recommend adding a line at the end of this description like "hint: consider newlines" or better yet, just adding a case to the visible tests that includes several newlines at the end.

  • Default User Avatar

    Similar issue to others. "Expected: false, instead got: true" for "567890".

    If this case should return false, the description is broken, because full conditions are not explained.

    This test case is exactly six digits, and contains only numbers -- per the description, 'true' should be the answer.

  • Default User Avatar

    I see! Thanks for the clarification.

  • Custom User Avatar

    Description of $ in the docs on re shows that it can actually be the issue.

    It can be checked easily simply by running following test case: test.assert_equals(validate_pin("1234\n"),False). Your solution will return True and fail the test.

  • Default User Avatar

    This comment is hidden because it contains spoiler information about the solution

  • Custom User Avatar

    Your solution thinks that strings with a newline at the end are valid PINs.

  • Default User Avatar

    Looks like I'm running into similar problems as a lot of others here. Passing nearly every test except for "Wrong output for '1234
    ': True should equal False"

    Which doesn't make any sense to me. I think this kata is broken.