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.
I have the same issue, dont know why it is happening
same with python code.Need to remove d or retain it?!
If d is retained as default value in case of in adequate subarray, then tests wont execute.
If d is removed,the tests will run but throws up execution error as assertion,expects a second argument for success!
The functions in C++ are inaccessible as well.
@JohanWiltink, thanks. I didn't know that the JS test code is inaccessible to the user. That's not the case in C/C++ or NASM. In those languages you do have to make your 'reference solution' private, static, or localized.
There is no issue; functions in tests are inaccessible to the user in JavaScript.
Something is wrong here..I get the right answer when I print the value before returning, but when the value is returned the return value is not same as the print statement just before that! Btw, the code is in python.
print(distance) - this print right value
return(distance) - the value returned is wrong here!
@k2coder you had single and double quotes there, use only one kind.
I had the same issue. I was using print() for the output. When I used return, test cases passed.
Thanks. I ran the code again, by just changing the variable name from i to counter. It was successful this time!
Strange, but happy!!
Log says:
'Bart, Lisa, Maggie, Homer & Marge'
and I am returning the same result. Then why is the following error, when am not adding any extra bits?
Must work with many names: "'Bart, Lisa, Maggie, Homer & Marge'" should equal 'Bart, Lisa, Maggie, Homer & Marge'
Thanks for any pointers.
Can't say much without seeing your code. Mark it as having spoiler content if you post it.
This comment is hidden because it contains spoiler information about the solution
Thank you. I added print statements. I was not aware of the availability of this facility in codewars IDE.
So solved! Thanks again.
Not easy to follow your code if you don't use proper markup
You can use print to see what the input is.
Thank you! That worked!
Loading more items...