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.
Codewars katas ALWAYS have you returning stuff instead of printing them out like other programming websites. Honestly, it's a much better way to do it.
And yes, that's probably where you've gone wrong. Hope it helps!
You're iterating over array2 and if array2 is an empty array [], then it's a NoneType, which is therefore, not iterable. Maybe add an exception handler or a check at the start of the code, that should help. :)
The first test case passes an empty list. That's probably the reason.
I think with a better description and an example or two, this could be bumped down to 4 or 5kyu. Nevertheless, was fun to do. :D
Some random test cases would be nice. Also, I'm really nitpicking here but I saw some of the test cases expecting values rounded to 1 decimal places (i.e 200.00 was 200.0)
It's not much but it still got me wondering for a second if I should round to two decimals like you said in the question or if it should be one, so, just thought I'd point that out. Otherwise, nice kata!