+ 1

I want to learn to code a program to find mean deviation in python. I would be grateful if you could show me how. Can you help?

12th Mar 2019, 2:57 PM
Rizan
Rizan - avatar
3 odpowiedzi
+ 5
hi Rizan, since python 3.4 there is a statistics module available. For more information you can run the attached script. https://code.sololearn.com/c82E4Mk1rouR/?ref=app May be you want to post some example data you want to use? Here is also a direct link to the python documentation of statistics module: https://docs.python.org/3/library/statistics.html
12th Mar 2019, 7:05 PM
Lothar
Lothar - avatar
+ 4
hi Rizan, I have done an example for you, so I am sure you can catch your taks better. https://code.sololearn.com/cRHFnjCiTTGW/?ref=app
13th Mar 2019, 9:59 AM
Lothar
Lothar - avatar
0
Thanks! I am new to python and find the libraries very helpful. I didn't know about the statistics library. So, this is very helpful!! I want to learn to take values from a list [ExampleData] or from a file, and then compute the mean and mean deviation the hard way. Mean deviation is sum of (values - mean)/number of items. len(ExampleData) could be used to get the number of items. What could be done to get the differences, for individual values in the list and their sum? Could you please code an example for me?
12th Mar 2019, 11:12 PM
Rizan
Rizan - avatar