0

Basket players code

Hello! im doing code to solve basket players question in python for data science course and when i run my code it say that my code is wrong but i think its correct one. could anyone enlighten me? here is my code ====================================================================== players = [180, 172, 178, 185, 190, 195, 192, 200, 210, 190] num = len(players) mean = sum(players)/num var = 0 for i in players: var = var + (i - mean)**2 variance = var/(num-1) std = variance**0.5 bottom_range = mean-std upper_range = mean + std print(std,mean,bottom_range, upper_range) num_range_oneSTD = 0 for i in players: if bottom_range < i < upper_range: num_range_oneSTD += 1 print(num_range_oneSTD) =====================================================================

9th Dec 2021, 5:53 AM
Andre Martin
1 Resposta
+ 6
variance = var/(num) #print(std,mean,bottom_range, upper_range)
9th Dec 2021, 7:16 AM
Simba
Simba - avatar