Ad
  • Custom User Avatar

    ...?

    again, this is not a kata issue.

  • Custom User Avatar

    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...

  • Custom User Avatar

    Not an issue.

  • Custom User Avatar

    Looks like an old CW issue that has been fixed.

  • Default User Avatar

    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?

  • Custom User Avatar

    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.

  • Custom User Avatar

    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.

  • Default User Avatar

    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.

  • Default User Avatar

    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)) by Test.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!