Now i understand. Im trying to figure it out a solution
This comment is hidden because it contains spoiler information about the solution
Thank you for your feedback but that solution does not pass all the tests.
Thank you for reminding me, Done :-)
@Cépagrave: you forgot to rank it...)
I'd say more of a 5 - the string manipulaiton is a level 5 thing. Anyway it was in beta for 2 weeks and only got 4 solves. I will probably put it back again at some point. I'm currently making a kata about the simple substituition cipher if you want to have a look? ;)
Thanks for your input
Well, then with imports allowed, the kata seems good to me as it is. I agree it would be too simple without the string manipulation. Removing duplicates in solution is not very hard and doesn't feel weird to me. I added my satisfaction (sorry i forgot till now). I would add a ranking if it was possible, i couldn't (because of draft mode i guess). I would say 6 kyu, what do you think ? I'm still not very confident with the ranks. I've read in the wiki that you'd need 10 votes then, and you have 5...
Okay I think you had a problem when I had the sorting in the wrong order but that was a while ago.
Yeah I just assumed eveyrone would use numpy roots and I don't really like disabling imports because I feel that's kinda the beauty of python.
The kata isn't that bad - it can be a bit frustrating to solve though. I think it looks like I'm trying to take a trivial task (numpt roots) and just make it harder by removing repeated roots and string manipulation. It's just a bit here and there and katas should be direct and focused. Perhaps there could be a kata to find the number of unique roots of a polynomial of degree n?
Thanks for letting me submit. I've learned something nice now, didn't know about numpy roots !
About the errors I had, i haven't been able to reproduce them, but i know it was not related to repeated solutions (because i had those too !).
I agree that the hard version would be a nightmare, and certainly a bigger one for the checking code than for the solution maker. There could be so many different answers.
So maybe not the best idea.
But, a way to make your kata more difficult, could be to disable imports.
Implementing a math method like the solving of cubic equations, even though the method is easy to find on the web, is a good exercise.
Then, about the question of the string business, i don't know. It's not very hard and quite satisfying, ...
Do you know why the kata is stuck at beta stage ?
When you have submitted, I'm going to unpublish it again and maybe we could work on some ideas together? I think we can use kumite. Let me know :)
I'm interested in why it took the wrong order @Cépagrave. I sorted it first by real and then by imaginary. Should work fine because imaginary parts are always 0, -x and +x so there would be no rounding errors unless abs(x) is really small in which case the it is probable that you found a repeated solution?
I think you had the same problem as other people and you didn't identify a repeated solution correctly.
I get what you mean about it being two katas. I don't think this kata is good enough in its current form.
I orignialy thought of doing the hard version but is sounds like a NIHGTMARE.
Maybe this idea could work. Something along the lines of imput being 4 integers, output some exact solution? Or maybe just have input as integers, scrap the string business, and just make it easier?
I unpublished it because I didn't think it would ever get out of beta - I've put it back for now so you can submit if you like ;)
All right, got it, thanks.
So for the author:
The only issue i've had while solving: the solution checker sometimes took the members of my solution in a wrong order, because (i think) of the rounding precision of the imaginary part of complex numbers. But somehow this problem disappeared, maybe you changed the testing code ?
My opinion on the kata : it's a very good idea to propose a cubic equations solver kata. But the way you propose it feels like two different katas : one to reorganise the initial string, and another to actually solve a cubic eq.
The reorganisation part is fun, but a little strange, because only based on addition/subtraction and sides of equation. A complete reorganising kata with a wider range of inputs would be more challenging (maybe there's already one on Codewars ?).
The solving part is great, it needs a flexible solution checker with forgiving rounding. An idea then, could be to add a harder version, asking to give exact solutions, using fractions, roots and/or trigonometry.
there aren't really any "way" to collaborate to it. Sort of. If it's in draft, that means the author unpublished it. First question would be "why?". If this is about issues to resolve and you have the solution to them, you can tell to the author (he'll see our messages here anyway) and see with him. But if he just doesn't want the kata to be published for a reason or another, there is not much to do. ;)