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.
This comment is hidden because it contains spoiler information about the solution
Test cases on submit are completely wrong. The average of [1, 1] is 1, not 0. The average of [1, 1, 2] is 1.33, not 0. Test cases are missing message.
function name in solution template should reflect what the user is trying to solve. For example, this one should be called
average
. An explaination should be added to the description about this 'lesson' and what problem the user is trying to solve. An example provided in the description is very helpful. I would recommend adding an example there.A lot of repeated code here.. remember the DRY principle.
tmp is pretty ambiguous. For readability/maintainability, you might want to call tmp 'sum'