в чем ошибка? помогите пожалуйста!! | Sololearn: Learn to code for FREE!
New course! Every coder should learn Generative AI!
Try a free lesson
0

в чем ошибка? помогите пожалуйста!!

import numpy as np data = np.array([150000, 125000, 320000, 540000, 200000, 120000, 160000, 230000, 280000, 290000, 300000, 500000, 420000, 100000, 150000, 280000]) mean=np.mean(data) std=np.std(data) low, high = mean-std, mean+std data2=data[low<data<high] print((len(data)/len(data2))*100) Вам дан массив, который отражает цены на дома. Рассчитайте и выведите процент домов, которые находятся в пределах одного среднеквадратического отклонения от среднего.

17th Apr 2022, 2:21 PM
atikd
1 Answer
0
To solve the task we need to use the std formula given in the lesson, not the std formula from numpy. Compare the formula used by np.std and the one given in the lesson – they are different: n vs. n-1
17th Apr 2022, 2:46 PM
Lisa
Lisa - avatar