Ad
  • Custom User Avatar

    Hi. Could you change the first line of initial solution code to def prime_primes(n) with lower n. Uppercase throws an error:

    SyntaxError:
      /workspace/default/lib/solution.rb:1: formal argument cannot be a constant
      def prime_primes(N)
                       ^
    
  • Custom User Avatar

    As I did :(

  • Custom User Avatar

    I can understand your point. But someone would misunderstand the n is denominator?

  • Custom User Avatar

    98 valid solutions. I'll bite the bullet and say this is not a kata issue. Closing.

    Please read and follow the Troubleshooting Guide.

    Raising an Issue means you are 99% sure the kata has a problem, and not your code, otherwise you should raise a Question. If you raise an Issue and the problem is not with the kata, it will probably rightfully be closed without addressing your problem.

  • Custom User Avatar

    You mean the argument? Some languages do not allow uppercase letters for variable names. In JS, N seems to be applicable; in other languages, n might be applicable.

    Just read over it. CodeWars supports multiple languages, and sometimes this stuff happens.

    If it offends you that references to other languages seep through in JS descriptions, do a couple of Haskell kata. Concepts that are different are quite often left untranslated.

  • Custom User Avatar

    Tests are good!
    Try harder!

  • Default User Avatar

    Thanks anyway, have a great one!

  • Custom User Avatar

    What is n (lower case) in the description? (JavaScript)

  • Default User Avatar

    No bother. It needs to be reproducible in order for anyone to do anything about it, that's all.

  • Default User Avatar

    I have started playing with this site for a week I don't want to disturbe anybody, but I saw a lot of comments about this topic and I just said it.
    I will check it again, but I find it strange that a code works for N = 400 and N = 800 and then it doesn't work for 600. Because if it worked for 800 means all the prime primes number I found we re good, but for 600 it s strange. Sorry for bothering you I ll try to rewrite the code and maybe rethink it. Thanks !

  • Default User Avatar

    There's a comment every day on codewars where someone pinky swears that their code is right and tests are wrong. They're almost all wrong.

    Please include the faulty test case, otherwise this is a guessing game, one that is almost certain to lead to nothing. Either that, or it is outright dismissed without consideration.

  • Default User Avatar

    Try to see if the python tests are good, because I fail 10 random tests and I have checked everything and it works fine. The test fail random they don't have any coleration between them. Thanks!

  • Custom User Avatar
  • Default User Avatar

    Ruby translation kumited :) please review and approve ~~

  • Default User Avatar

    I tried to fix the kata by editing the reference solution's / operator part, but my edit removed py2 entirely...
    At least you won't see the broken random tests, so I'm marking this issue as resolved.

  • Loading more items...