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.
you don't need strip
This comment is hidden because it contains spoiler information about the solution
But this code will produce an incorrect answer to arr = [1,1,1]. Or do I understand something wrong?
Note:
Your points are not included in the array of your class's points. Do not forget them when calculating the average score!
i wish import math had an average function
why you add 1?
thanks
class_points
does not includeyour_points
, so its length is the number of every other person in the class, which is why it does weirdly still makes sense to add exactly1
more for the calculation, even though it won't change the calculation...I think this solution is incorrect logically. The len function returns the length of the list meaning if there are 8 elements in the list, the len function returns 8. so adding 1 to it increases the length to 9 which is logically incorrect for the calculation of average with 8 elelment.
My view though
You run the risk of an error without it.
It was actually my solution, but then I read in the discussion that you don't have to add your points. However my mistake was in wrong placement of ">" :/
I too was going to add .strip() to my code to take the spaces off the ends. However when I tested with just .join() it passed so I left it out
This comment is hidden because it contains spoiler information about the solution
This comment is hidden because it contains spoiler information about the solution
I was going for this but couldn't figure out how to use the strip in the same line.
End up adding a second line with: return words.strip('')
:-(
Loading more items...