Is there any bug in my code? [solved] | Sololearn: Learn to code for FREE!
New course! Every coder should learn Generative AI!
Try a free lesson
+ 1

Is there any bug in my code? [solved]

You are given an array that represents house prices. Calculate and output the percentage of houses that are within one standard deviation from the mean https://code.sololearn.com/c1ioY10tytVP/?ref=app

25th Jul 2022, 12:10 PM
Ekramul Haque
Ekramul Haque - avatar
9 Answers
+ 4
What do you mean by "big"? There is an error in the code. Please explain what the ode is supposed to do.
25th Jul 2022, 12:40 PM
Lisa
Lisa - avatar
+ 4
If it is a sololearn task, please mention course name and task number so we can check on it!
25th Jul 2022, 12:43 PM
Lisa
Lisa - avatar
+ 2
You did something like: a<= b >= c
25th Jul 2022, 12:46 PM
Korkunç el Gato
Korkunç el Gato - avatar
+ 2
A value cannot be smaller thant he lowe bound and greater than the upper bound at the same time. Also consider using parentheses around the conditions when infexing: data[(condition 1) & (condition 2)]
25th Jul 2022, 12:51 PM
Lisa
Lisa - avatar
+ 2
That depends on you. But you could put [solved] or something like that additionally into the title
25th Jul 2022, 12:57 PM
Lisa
Lisa - avatar
+ 1
Yes its from the course ' Python for Data Science' and the project name is 'House Price'
25th Jul 2022, 12:46 PM
Ekramul Haque
Ekramul Haque - avatar
+ 1
Thanx, Lisa. I think the problem arose because of the parentheses because I corrected the bound afterwards.
25th Jul 2022, 12:53 PM
Ekramul Haque
Ekramul Haque - avatar
0
My code is working now. Should I delete the post?
25th Jul 2022, 12:55 PM
Ekramul Haque
Ekramul Haque - avatar
0
Ok, got it
25th Jul 2022, 12:58 PM
Ekramul Haque
Ekramul Haque - avatar