Skip to content
Sign upLog in
← Back to Community

Summary

Profile icon
dpicinin

Write a function that accepts a list of data values and returns a summary that includes the mean, standard deviation, minimum, 25th percentile, median, 75th percentile, and maximum. You will need to import the numpy library in order to calculate the percentile. Do a little bit of research. In your function, also include a print statement that makes the output more meaningful.
summary ([4.5, 6, 7, 18, 6.2, 11.6, 24.3, 8.4, 10.3])

Voters
Profile icon
ebuss
Profile icon
egggyolk
Profile icon
dpicinin
Comments
hotnewtop
Profile icon
LewisWood4

The study of these disciplines plays the most important role in the future career in this field. In addition, I have also recently become interested in this specificity, because it is it that allows you to get the set of knowledge necessary for promotion in entrepreneurship. By the way, recently I was so glad that I was able to enroll in an MBA online for free. I believe this will really give me good opportunities in future endeavors. I wish you the same.

Profile icon
dpicinin

from statistics import mean, median, mode

def summary(num_list):
return mean(num_list), median(num_list), mode(num_list)

print("Mean, Median, Mode: ", summary([4.5, 6, 7, 18, 6.2, 11.6, 24.3, 8.4, 10.3]))

Profile icon
Vandesm14

What have you tried so far? We can't do your homework for you.

Profile icon
dpicinin

@Vandesm14
that's what I have achieved so far = /

Profile icon
SixBeeps

What exactly do you need help with?

Profile icon
dpicinin

@SixBeeps
I had 2 hours of class and I have to solve this, I have no experience with programming. I'm just lost

Profile icon
SixBeeps

@dpicinin
You've only had 2 hours of learning and you're already on arrays? That's really strange.
You seem to at least know some basic syntax. Give reading the NumPy docs a try.

Profile icon
dpicinin

@SixBeeps
Yes, classes started last week, and in 3 weeks, it will be the exam.
I am going through an intense MBA program with an emphasis on analytics. Besides Python, I will learn R. And English is not my first language.
Things are not very comfortable for me rn =/