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.
I changed the
Show
instance in preloaded, let me know if that works better.Approved. This looks great! Thanks for your work on this.
Had me stuck for a good bit! Very fun!
It's up to you what the specification should be, but the description needs to accurately explain why some functions are included and others aren't. Right now, it says that
hypot
isn't included because of its arbitrary positional arguments, but that's not the case.Why exclude
hypot
but includelcm
andgcd
, both of which take an arbitrary number of arguments.More generally, what is the specification on which functions to skip?
This comment is hidden because it contains spoiler information about the solution
Seconding the suggestion to remove the starter code, but if you do keep it, you should avoid the
hash
variable name as it overrides the built-in function of the same name in python.Cool kata! Some suggestions for the description, mostly based on what tripped me up:
index
is unclear, as it refers to the value we want to encode. I suppose it makes sense if we think of the encoding as a list, but there's no reason to do so.This comment is hidden because it contains spoiler information about the solution
Looks good! I ran it a number of times and was at least ~60 tests shy of passing each time.
This comment is hidden because it contains spoiler information about the solution
Sample tests and submission tests are using different types for
current
.This was great! The work put into the description and tests was very much appreciated!
So it looks like this kata was retired, but for future reference, the issue with the implementation of the random tests was this:
This test ends up comparing the solution's answer to itself, which will return true regardless of the correctness of the solution. Instead, you'll want to have your own code within the submission tests which produces the correct answer and compare the solution's result to that. Something like:
where
referenceDecode
is a known correct solution.You'll need more than one fixed test in your submission tests.
Loading more items...