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.
Note the leading
1e-9
. You supplied that.I have updated the text. Thank you for your assistance.
We are both wrong according to the web search I performed.... lol. Mean Average Deviation. I will change it once I figure out how to do so.
I have not received any error messages, can you provide an example of the "weird" error message?
You are right, there is nothing in the description to say what to do if there is no data. BUT if you follow the process given, then you realize when no data is provided, the answer has to be null. Also part of a developer's job is to look at the test cases and make sure their code will behave in such a way as to pass the tests.
This is the term my son's math teacher used when teaching them concept. Not sure the verbage really means anything to solving the problem. I will check it out and correct as needed.
Shouldn't step (3) be
Take the average of the distances
?!?I don't think that does what you think it does.
Did you intend to use
assert.approximately
?This just gives a weird error message on failure.
The correct term for this is Mean Absolute Difference, not Mean Average Distribution ;-)
There is this case in the tests:
But it's not specified in the description what to do if there are no data.
After much thought, I decided that I will attempt to turn this into a kata. While I understand there are some similar katas out there, it is the learning experience of creating a kata from start to finish which I desire. Therefore, I need to finish it out.
I don't think you should convert this kumite into a kata. Finding the average of an array is not a novel idea, and performing a trivial
map
isn't interesting, so it'll likely get retired.FArekkusu, very nince job improving the kata. Some small changes. Used your solution to calculate the solution value, added an edge case for negative values in the average and allowed the random number generator to generate negative numbers.
Working on my first Kata, I am not sure the random test cases will convert to a kata. I'm concerned the random numbers have to be evaluated to determine the answer and the only way to do that is through a function that calculates the answer.
I enjoyed this one. Spent a few hours fighting time out and call stack errors, but finally got it. Learned a lot on this one.
Loading more items...