+ 1

# Basketball players project in python for data science

import numpy as np p = np.array([180, 172, 178, 185, 190, 195, 192, 200, 210, 190]) mean = np.sum(p)/p.size v=np.sum((p-mean)**2)/p.size std=v**(.5) print(std) That’s my case and it does say it’s close but I can’t figure out what I am missing from the code to have it pass. In the question it does ask to calculate and output how many players are in the range of one standard deviation but I don’t know what that means exactly. I tried print(range(std)) but that also didn’t work. I’m confused abouts needed.

5 ответов

0

1. You're supposed to use the std/ var formula mentioned in the lesson, not the one from numpy
2. Read the taskd description carefully: You need to output the number of players that meet the criteria

0

So it should be print(range(mean-std, mean+std)) ?

0

The NUMBER OF PLAYERS in the range

0

I apologize but that still isnt a very clear explanation. I do appreciate you taking the time to help anyway. There is just something not exactly clicking for me between my notes, the lessons, the comments, and your answer. I just am still a bit confused.

0

The number of players: How many players. 1? 2? 3?
And use the variance formula from the previous lessons, not the one from numpy