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.
The issue described below is still present.
This is not new at all. Finding average has been done many times, this is literally just adding a "take every nth element" which has also been done.
i.e This is duplicate of these two katas combined:
https://www.codewars.com/kata/every-nth-array-element-basic
https://www.codewars.com/kata/calculate-average
Even if the array elements are integers, because the final result is a float comparing equality directly will break because of floating point errors.
For example, if someone adds up the integers after dividing by the length, the result will be different.
Random tests are vulnerable to input modification.