+ 1

Can anyone fix my code? If I run it in the playground it's working but not working for the code project

https://code.sololearn.com/ckXTThhRmr3r/?ref=app

25th Dec 2022, 9:14 PM
Kanake Karani
Kanake Karani - avatar
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
26th Dec 2022, 2:54 AM
Brian
Brian - avatar
+ 2
Thanks Brian. I had quite some hard time spotting this
26th Dec 2022, 10:15 AM
Kanake Karani
Kanake Karani - avatar
+ 1
Kanake Karani, you are welcome!
26th Dec 2022, 10:55 AM
Brian
Brian - avatar