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 have found flaws in the reference code which is used in the tests. I have now corrected the reference code so the issue should be resolved.
Oh, thanks, that's clearly a mistake. I have corrected it.
Thanks a lot for the help. I have added considerably more random tests (now also with messages to the solver).
q
can be greater than 1, so I think that's why it fails. I will add a test which checks for numbers like 4/3 which would be in Cantor set if it was extended to the whole real line.Oh, yeah, sorry. I will fix that.
I think I like the idea of two arguments
num
anddem
. It keeps everything simple.I guess I thought it would make it more difficult to translate the kata into languages which don't have a
Fraction
class.Would it be an idea to keep it as a list, just to keep the kata accessible and translatable?
Sorry, I am a bit new to Codewars. Could you explain in words what the problem is?
Thanks!
Thanks for your suggestion!
Sure, I will add a line about that in the description.
Yeah, you're probably right. Just thought it would be nice that the function reacted in a graceful way to typos in the input. Of course, most like nobody will use this function outside Codewars so it is probably better to make the description as clean as possible.
Thanks for the question!
I didn't know about the fractions module. I will definitely give it a look and consider implementing your idea.