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.
No wayyyy :0
oh yeah!that's it
I think it is better to train yourself to be a oneliner. Actually I am new here. It is my second day here. And I am trying my best to complete challenges with one line only. It is fun you know. And it changes your mind a lot. THANK YOU ONE LINERS. You teach me a lot.
Unless there is no-one else in the class and the class_points is an empty list...
Is this answer definitely correct? Where in the code is it taken into account that “Note: Your points are not included in the array of your class’s points. Do not forget them when calculating the average score!”?
i have no idea why it worked. it could have been a bug in the tests
because it slices out the min and max so the sum will be 0 if there are two or less elements in the array.
Not incorrect. That part of the kata is a red herring, wether the author intended that or not. Just think about it, if your score is the highest score it will always be above the average of all other scores and your score can never be low enough to make the average lower than itself. The code here is using sound logic.
the error is in the test code. At each test, it doesn't take into account the total number of items in the list ( your_points + class_points)
that's why it passes even with your code :)
two years ago but we can assume the input will always be a bool since that is what it takes as an argument. Since its taking a boolean as an argument it is reasonable to assume it isn't accepting user input, rather the boolean is being generated elsewhere in the code.
nice
It doesn't matter whether you add your own points or not, the answer will be the same either way.
it passed tho
This comment is hidden because it contains spoiler information about the solution
Incorrect. The Kata says to include your own points into the average.
Loading more items...