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 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.
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.
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.
The solution provided by juansgaitan for Javascript is wrong! It fails the edge case where the missing number is the last number in the series. For instance if the array is [2,1,3] the missing number would be 4. But juansgaitan's code returns undefined. This solution needs to be removed and the test cases need to updated to include an edge case.
This comment is hidden because it contains spoiler information about the solution