Loading collection data...
Collections are a way for you to organize kata so that you can create your own training routines. Every collection you create is public and automatically sharable with other warriors. After you have added a few kata to a collection you and others can train on the kata contained within the collection.
Get started now by creating a new collection.
This comment is hidden because it contains spoiler information about the solution
Sorry mate.
This comment is hidden because it contains spoiler information about the solution
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.