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.
Pretty much an exact duplicate of at least the following already approved Kata, since the exact solution (modulo the function name) can be re-used between each Kata:
I've unpublished the Kata for now. Please refer to Creating your first Kata for a comprehensive guide on authoring high-quality Kata.
Ok, you are almost there, but the problem is that you are still calling the user solution in the same unshuffled order. You should move the
dogs_race(i)
call to the assertion:test.assert_equals(dogs_race(case[0]), case[1])
I haven't thought about that. I have added shuffling to my test cases.
Yeah, random tests are much less important for easy kata, however it is still good authoring practice, and almost always required before a kata has a chance of approval.
You can simply use your current approach to build a list of input-answer pairs, then use
random.shuffle
to make the order random, and run through thosegood point, I have changed the description and removed unnecessary import
Random tests are not random
Okay, so you do not want this solution to be submitted.
I think you have your assertion the wrong way round.
But, looking at the solutions, I think you have a bigger problem. You will have to force solvers to do what you want, and not just ask them nicely. Which is a problem, because kata generally are about the result, and not the way you get there.