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.
Fork here.
I suggest you do one thing: either parse the polynomial from a string, or find roots. ( I think both are duplicates though. )
at first, I wanted to set the condition in a different way. Inputing the string like '2x^2 + 4x + 5 = 0' and needs find roots. But i think that it hard for 7 kyu and for 6 kyu it not interesting to solve this kata.
That you think, maybe make case of '2x^2 + 4x + 5 = 0' and gives it on 6 kyu?
Inconsistent return types is not good kata design. Find another way to signify infinite solutions.
Please use appropriate datatypes. The input should be a 3-tuple of numbers, not a string. Adding a secondary parsing task to the primary arithmetic one is not a good way to make a kata more interesting.
"Do one thing, and do it well."
This comment is hidden because it contains spoiler information about the solution
This comment is hidden because it contains spoiler information about the solution
I am not exactly sure what kata you mean exactly, but I remember some kata about Mancala\Sungka\Kalah\Bantumi: Sungka, Pot-tentially the Greatest Mancala Kata. As far as I know, all of them are distinct games, all coming from the common family of Mancala games.
Having said that, I do not know how existing kata, and the games themselves, are close to each other, and whether they are close enough to be considered dupes/repetitive. It's possible, I just haven;t solved the kata.
It is because by use of
float
and real division operator/
, you introduce small inaccuracies into your solution, which sometimes, in certain circumstances, for some inputs, can trick your solution into doing some incorrect approximation, or unintended rounding, because this is how floats work. When you change line 6 of your solution to something liketime_decimal_secs = g * 60 * 60 // relative_speed
, you have no floats anymore, no inaccuracies, and (if I see correctly) solution with this change will always pass.You can check what exactly happens by recreating one of failing inputs in your IDE and running it with a step-through debugger, observing intermediate variables. You will notice how in some point, some rounding happens, which slightly changes the outcome and leads to an incorrect answer.
"0 0 0"
ten times is not necessary. Once should be enough.https://www.codewars.com/kata/reviews/68526d48404799a753fa23c9/groups/68528d3184ac1bcf1e0dd799
It's not about tests which are "rounded up". It's about your code which is a bit buggy, and sometimes performs incorrect rounding.
If copilot ever generated me code which contains
96
, I would disable it immediately :DHi, thanks for taking the time to look at my problem. I'll make changes later.
Loading more items...