1>>> import statistics
2
3>>> statistics.median([3, 5, 1, 4, 2])
43
5
6>>> statistics.median([3, 5, 1, 4, 2, 6])
73.5
8
1
2 from scipy import stats
3
4speed =
5 [99,86,87,88,111,86,103,87,94,78,77,85,86]
6
7x = stats.mode(speed)
8
9print(x)
1
2 import numpy
3
4speed = [99,86,87,88,86,103,87,94,78,77,85,86]
5
6
7x = numpy.median(speed)
8
9print(x)
1
2 import numpy
3
4speed = [99,86,87,88,111,86,103,87,94,78,77,85,86]
5
6
7x = numpy.median(speed)
8
9print(x)