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.
...?
again, this is not a kata issue.
that's an error occurring frequently with cw itself, recently. It's independent from the Kata and you cannot do anything about it. You'll have to wait...
Not an issue.
Looks like an old CW issue that has been fixed.
I encountered the same problem (with the some answer in Ruby), and hadn't a clue how to fix (circumvent) the problem in the test cases - because it is clear that the problem is there. While debugging, I put a
p string
as the first line in the method... and got the solution accepted. You might want to try that.Do you have the problem with other Ruby versions as well?
Why did I get a downvote for that? You get integers as arguments, not just string. Meaning you will get an error because reverse won't work on integers. You can test it in the example test cases. If you comment out the integers, it passes but with it in, it fails.
String functions such as reverse only work on strings and not on integers. You need to actually modify the str variable so that it can iterate over it and reverse it.
No before your code returned
#
(the beginning of "#... Enumerator...") and the correct answer was(2**2)(3**3)(5)(7)(11**2)(17)
. That is for that I said your code was wrong. Do you understand when I say: "actual" (your answer) and "expected" (the good solution) was swapped? Did you try your code on your computer? If so you should have seen that you are returning an Enumerator... but NOT the string it is asked for. Please tell me when you succeed.Unfortunately in "Your Test Cases:" (RUN TESTS button) "Actual" and "Expected" are swapped. I tried many times to change that but the re-edit is not taking into account. Try the "SUBMIT" button, here the order for the tests is good. If you want you can replace in the "RUN TESTS":
Test.assert_equals("(2**2)(3**3)(5)(7)(11**2)(17)", primeFactors(7775460))
byTest.assert_equals(primeFactors(7775460), "(2**2)(3**3)(5)(7)(11**2)(17)")
which has the good order.BTW I'm afraid that there are errors in your code.
Thanks for your post!
Edit: I just succeeded to make the change... Good luck!