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.
nice, clean!
unthinkable :)
Absolutley fantastic. I love you madly!
shot operator
Very clever, Gjf!
Jeezz I've been on this problem for hours and to see this is depressingly inspiring... weird.
Ah, crap. I tried a similar solution, but screwed up the order of operands for
%
, didn't catch my mistake, and abandoned that train of thought...thanks :)
...
is the spread operator(Spread syntax MDN article). You should google it to learn more.can i ask a question, i dont understend the three dots before list, can you tell what are those. thanks
I am a year late, but what does the ! mean ? Never mind, I got it. Had a brain fart
Point taken. I'll add info about the linear relationship to the kata description.
Your comment, especially the final paragraph, raises an interesting question about how much information should be provided in a kata description. Opinions vary. I tend to agree with your statement about including all necessary information. But Codewars is hardly unanimous on this issue. For example, I recently completed a kata whose description plainly stated that only the chickens inside the cages were safe. Then testing revealed that some of the chickens outside the cages were also safe. When I complained, the response was that this discovery was all "part of the fun."
In fact, I have tackled plenty of kata on Codewars that required running the sample tests to discover what was really required of my code. For those kata authors, this is apparently also part of the fun. I'm really not crazy about playing guessing games or being misled when I come here to work on coding skills, so it was not my intention to put anyone through that with this kata.
Your defense of your kata is unsound.
We are given two data points. There are countless functions which include these two data points, only one of which is linear. We do not recognize that the solution is linear, we guess and that is the flaw in your kata. A problem in a mathematical text will include this relevant information (either explicitly, by definining it as a linear relationship, or contextually, by including it in the linear equation section). Your kata description lacks this information. This is why the more explicit kata are clearer.
A warrior can better guess the nature of the function by plotting the points in the sample tests, but sample tests should be used for testing, not relaying necessary information (with some caveats that do not apply to your kata). All necessary information for solving a kata (short of the actual method) should be within the kata description.
It's a mistake on my part, you version is better.
Loading more items...