Ad
  • Custom User Avatar

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

  • Custom User Avatar

    Sorry mate.

  • Custom User Avatar

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

  • Custom User Avatar

    Hello, interestring kata for applying memoziation :)
    I have one question on the Python version : why testing with booleans ?
    Like :
    Test.assert_equals(abs(len(primes)-5)<3,True)
    Test.assert_equals(abs(len(primes)-9)<3, True)

    At first i used the global primes list that would fail on the first of the abose test, re declaring it in the function (so keeping the global one unchanged) made the fisrt of the above test succeed, but it's not a clean solution - and you loose previous computations. Such function may raise a TypeError for boolean inputs.

    Eventually printing n did not seem to work for boolean input, nothing to do with your kata but still annoying when debuging.