6 kyu

Prime Primes

152 of 485rprendergast180
Description
Loading description...
Algorithms
View
AllIssues5QuestionsSuggestions1Show Resolved
  • Please sign in or sign up to leave a comment.
  • Glyxerine Avatar

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

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

      Issue marked resolved by JohanWiltink 4 years ago
    • Glyxerine Avatar

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

    • achambily Avatar

      As I did :(

  • p4ai 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!

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

    • p4ai 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 !

    • natan Avatar

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

    • p4ai Avatar

      Thanks anyway, have a great one!

    • kingrz01 Avatar

      Tests are good! Try harder!

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

      Issue marked resolved by JohanWiltink 4 years ago
  • ejini战神 Avatar

    Ruby translation kumited :) please review and approve ~~

    • user8436785 Avatar
      Suggestion marked resolved by user8436785 4 years ago
    • akar-0 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)
                         ^
      
  • HerrWert Avatar

    This is an intriguing kata, but the sample tests are apparently for an entirely different kata!

    • Bubbler Avatar

      I fixed JS version by directly copy-pasting @Souzooka's translation into the Edit screen. Everything should work as intended now.

      Issue marked resolved by Bubbler 7 years ago
  • tmxk Avatar

    (using python2) All fixed tests passed while all random tests failed. The second number "expected" is always 0 in random tests.

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

      Issue marked resolved by Bubbler 7 years ago
  • Blind4Basics Avatar
    • issue: needs random tests
    • suggestion: needs to use real assertions, not test.excpect (that's done the "not so bad" way, but it's quite annoying to debug right now)
    • anter69 Avatar

      Random tests added, test are now using test.assert_equals().

      JS version is still totally wrong...

      Issue marked resolved by anter69 8 years ago
  • anter69 Avatar

    Updated the description a bit.

  • user8992180 Avatar

    twoOldestAges again! The author promised to fix kata three monthes ago...

  • St3f4n Avatar

    I got a completely different Kata to solve than the one in description. It requires me to solve the twoOldestAges function in Javascript...

    • myjinxin2015 Avatar

      I've seen the twoOldestAges three times in three katas, a crazy author...

    • St3f4n Avatar

      Yes I saw it before too :) and even twoOldestAges is not solvable, one test is messed up... By the way what is going on with the site I get timeouts all the time?

    • rprendergast180 Avatar

      Sorry, this was my first kata and I didn't change the initial function the user is given (twoOldestAges was the default function I used to know the syntax). I updated the kata; it should be fixed!

      Sorry!

    • anter69 Avatar

      I tried to remove the JS part, but I can't do it. The author is inactive. Anyone has the will to translate it or the rights to remove it?

    • Blind4Basics Avatar

      couldn't remove it either... I tried to empty the differnt code parts, but the engine didn't want to republish the kata this way (note: I lost the sample tests in the operation unfortunately so I used one part of the test cases... :s )

    • Voile Avatar

      A language version can't be deleted by anyone but the author.

  • g-money Avatar

    Don't forget to mention that the numerator has to be less than the denominator in a prime prime