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.
Guys i dont know java,i will try to fix this later.
Mocking @shadowmanos -> the translator :D
I'm waiting too :)
Hi,
I just tested the java version: all is fine so this is a problem with your code, not with the kata.
About that, be careful with declaring issues. Issues are when things are really broken, or invalid tests found in the kata or requierment that are not tested or unlocked way to cheat the problem or, or, or... but not when your code is timing out (I assume that is what you mean by "program runs out at the end"). This type of problem means just one thing: you didn't use the right approach to solve the problem ;) (let me guess: you use a loop ?).
One hint: post as
Question
rather thanISSUE
when you encounter a problem with a kata that has been already solved by tens (in our case hundreds! ;) ) of warriors in the same language.In Java, I seem to pass all tests but the program runs out at the end for some reason... Is there a fix for this ?
Im also waiting for random test fix :)
Doing a solution in Java and a random test outputs an error. This seems to be because Upper Case letters repeat in the test cases, while the description states that Upper Case are unique. Fix Please :)
Hi MMMAAANNN thanks...:-)
Thank you, this was very helpful and it was indeed the case that I was printing as opposed to returning the expected value.
I feel you may have misunderstood how things work here.
In CodeWars, what your function prints out never matters. You have to return the required value, not print it out.
In Python, if your function does not return anything explicitly, it returns
None
.Hope this helps.
I solved this using a loop which automatically prints each value to it's own line and I'm getting an error when running tests:
None should equal '1\n333'
I tried appending the items to a list then using the join function with a newline and I'm still getting the same error even though the desired output looks correct.
Yes, that's right. Thanks!
I think In your solution The cursor is jumped to the next line i.e. There is "\n" in the end of output.
Hi, I solved the kata, although it doesn't let me through and ouputs something contradictory:
Expected: 1
333, instead got: 1
333
Any suggestions?