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.
nope, not completely:
And you should push further your requirement for the tests. I'd suggest:
MAX_P = 10000
(talking about "usable" ones, meaning, that would be the upperbond for r2)MAX_P-2000
, then define r2 withr2 = r1 + randrange(2000)
note that you didn't correct the solution setup either.
yes, but still some things to address:
you didn't describe the order in which the sequences have to been put in the output list
do NEVER put your solution in the preloaded part (EDIT: well, it seems actually that you didn't put anything in the preloaded part... Then how do you compute the reference solution??? See below ;p )
"typo" in the random tests:
of course the two calls will return the exact same output, there, even if it's completely flawed!
test.assert_equals(actual, expected,"primes({}, {})".format(r1, r2))
=> That's good, to put the input in the message. Though, usingassert_equals
, the whole lists will be displayed in case of failures: depending on there length, that might make crash the consol output. Did you try to make it fail on long ouptuts, to be sure that's good?seeing "the amount of work", you should maybe unpublish it in the meantime. ;)