Loading collection data...
Collections are a way for you to organize kata so that you can create your own training routines. Every collection you create is public and automatically sharable with other warriors. After you have added a few kata to a collection you and others can train on the kata contained within the collection.
Get started now by creating a new collection.
this rocks
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.
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.
I see! Thanks for the clarification.
Description of
$
in the docs onre
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 returnTrue
and fail the test.This comment is hidden because it contains spoiler information about the solution
Your solution thinks that strings with a newline at the end are valid PINs.
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.