+ 1
Can anyone fix my code? If I run it in the playground it's working but not working for the code project
3 Answers
+ 2
Kanake Karani the formula for std needs another set of parentheses. As it is, only the denominator gets the square root due to order of operations rules. Add parentheses around the whole expression to find its root.
From this:
std=sum(((i-mean)**2) for i in players)/len(players)**0.5
To this:
std=(sum(((i-mean)**2) for i in players)/len(players))**0.5
+ 2
Thanks Brian. I had quite some hard time spotting this
+ 1
Kanake Karani, you are welcome!