I was pulling my hair out trying to figure why my code was passing all of my tests on my side and failing when I tested it here, until I realized that the submitted pins here were strings, while my code was built to accept ints. Got to be more careful about noticing input types in the future!
So what is that symbol. In browser my code return false with "123 " param. But not here.
Because you change the list's length and skip values. See what your code does here
This comment is hidden because it contains spoiler information about the solution
Which error? Please copy and paste it here. Have you tried clicking reset just in case you modified the sample tests without noticing?
Yes. It works correct but it shows me that there are a mistake. Why?))
Your code worked fine for me, and please, mark your post as having spoiler content next time.
This comment is hidden because it contains spoiler information about the solution
I was pulling my hair out trying to figure why my code was passing all of my tests on my side and failing when I tested it here, until I realized that the submitted pins here were strings, while my code was built to accept ints. Got to be more careful about noticing input types in the future!
There's a space after the 3, so it is four characters, but not all characters are digits.
Wrong output for '123
': expected true to equal false
validatePIN("123"),false, "Wrong output for '123'"
Why?