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.
The scenario is a good idea, but I don't think it's a good idea to be returning a String object.
Approved.
Right, this is my ommission. Sorry for troubling. Now all has mathched.
It might be that the code inside your loop is not executed, so it returns an empty string. Print the input to see why.
Your code is wrong, not a kata issue. Read the description again, the word you're looking for is
"wolf"
, not"Wolf"
they're different.Again, the same problem. Cannot pass the tests (Java), which say: expected:<[Oi! Sheep number 2! You are about to be eaten by a wolf!]> but was:<[]>. Am I right assuming, that my solution returns empty string except the required? Ubfortunetely, I don't know what is the source of the problen with tests. The IDE shows that all works as per the instructions, but it cannot test the Kata's inner (codewars') state... This is the second time when my solution returns no string value.
It might be a bug in your solution.
Hard to tell.
I've got a trouble: passed all tests, but click "Attempt" andit says the following:
expected:<[You shot all 0 zombies.]> but was:<[]>
expected:<You shot [all 20 zombies].> but was:<You shot [20 zombies before being eaten: overwhelmed].>
What might it be?
all occurrences
will this solution delete all the repetitions of the letters in text (e.g. "a" found 2,3.. n times) or delete only one occurence?
Does this code allow to check if the array is empty or not? E.g., when it contains neither element...