I have this homework assignment for my Programing 1 class and I can't figure this out. I'm supposed to A group of statisticians at a local college has asked you to create a set of functions that compute the median and mode of a set of numbers. Define these functions, median and mode, in a module named stats.py. Also include a function named mean, which computes the average of a set of numbers. Each function should expect a list of numbers as an argument and return a single number. Each function should return 0 if the list is empty. Include the main function that tests the three statistical functions using the following list defined in main: lyst = [3, 1, 7, 1, 4, 10]
I have this homework assignment for my Programing 1 class and I can't figure this out.
I'm supposed to
A group of statisticians at a local college has asked you to create a set of functions that compute the median and mode of a set of numbers. Define these functions, median and mode, in a module named stats.py. Also include a function named mean, which computes the average of a set of numbers. Each function should expect a list of numbers as an argument and return a single number. Each function should return 0 if the list is empty. Include the main function that tests the three statistical functions using the following list defined in main:
lyst = [3, 1, 7, 1, 4, 10]
Trending now
This is a popular solution!
Step by step
Solved in 3 steps with 1 images