find mean median mode in python code example

Example 1: statistics mode python when no.s are same

import statistics
statistics.mode(x)  #mean and median are also available.

Example 2: calculate mean median mode in python

>>> import statistics

>>> statistics.median([3, 5, 1, 4, 2])
3

>>> statistics.median([3, 5, 1, 4, 2, 6])
3.5

Example 3: mean median mode using python

import numpy

speed = [99,86,87,88,86,103,87,94,78,77,85,86]

  
x = numpy.median(speed)

print(x)

Example 4: how to find mean media and mode python

best source watch this clip: thttps://www.youtube.com/watch?v=nZ0DqnTqV88