Ad
  • Custom User Avatar

    If there are an equal number of naughty and nice it should return 'naughty'. In the example you provided there is 1 naughty ('broke...') and 1 nice ('got...') while the other 2 don't fit the pattern. Without seeing your code I can't offer suggestions but it worked for me in Ruby.

  • Custom User Avatar

    I have the same question as a prior poster but can't read the answer since it's a spoiler. For ("gf","FG") the test wants to return true but how is this possible? Using str.ord I'm getting 103, 102 for "gf" and 70, 71 for "FG". How are these equal?

  • Custom User Avatar

    This comment is hidden because it contains spoiler information about the solution

  • Custom User Avatar

    My solution seems to work for this Kata but I think the author's is flawed. He lists the following test conditions:

    Test.assert_equals(find_primes_sextuplet(70),
     [7, 11, 13, 17, 19, 23])
     
     Test.assert_equals(find_primes_sextuplet(600),
     [97, 101, 103, 107, 109, 113])
    
     Test.assert_equals(find_primes_sextuplet(2000000),
     [1091257, 1091261, 1091263, 1091267, 1091269, 
     1091273])
    

    But the first sextuplet of primes > 70 is not [7, 11, 13, 17, 19, 23] (this equals 90). The correct answer is [5, 7, 11, 13, 17, 19] (equals 72). And that third test case is completely off because the total of the array shown is well over 6,000,000, and the correct sextuplet should be [333323, 333331, 333337, 333341, 333349, 333367]. Am I not understanding the requirements?

  • Custom User Avatar

    This comment is hidden because it contains spoiler information about the solution

  • Custom User Avatar

    I can't get this to break on my machine but it fails the last test in the test suite. New to the site, how do I see the test parameters being used to test the code?