Excuse my ignorance as I am still freshly new to python programming.
My issue is trying to iterate through a list and trying to find the median of each value in the list. For now, I think I am getting the right idea as I am looping through my data list and print out each output. I am stuck on trying to implement the statistics
module to work with the median()
method to get an output. Here is my code...
import statistics
number_data = [2, 1, 5, 7, 2, 0, 5]
def median_number(num):
for i in num:
print('Median:', i)
median_number(number_data)