1answer.
Ask question
Login Signup
Ask question
All categories
  • English
  • Mathematics
  • Social Studies
  • Business
  • History
  • Health
  • Geography
  • Biology
  • Physics
  • Chemistry
  • Computers and Technology
  • Arts
  • World Languages
  • Spanish
  • French
  • German
  • Advanced Placement (AP)
  • SAT
  • Medicine
  • Law
  • Engineering
Ymorist [56]
4 years ago
11

Statisticians would like to have a set of functions to compute the mean, median and mode of a list of numbers. The mean is the a

verage of the numbers in the list. The median is the number that would appear at the midpoint of a list if it were sorted. The mode is the number that appears most frequently in the list. Define these functions. Please use the starter code stats.py. Expected output: List: [27, 5, 18, 66, 12, 5, 9] Mode: 5 Median: 12 Mean: 20.285714285714285
Computers and Technology
1 answer:
Rufina [12.5K]4 years ago
3 0

Answer:

<em>Python Programming Language</em>

import statistics

mylist =  [27, 5, 18, 66, 12, 5, 9]

print("Mode: ",statistics.mode(mylist))

print("Median: ",statistics.median(mylist))

print("Mean: ",statistics.mean(mylist))

Explanation:

This line imports stats.py into the program

import statistics

This line defines a list <em>(The example list in the program)</em>

mylist =  [27, 5, 18, 66, 12, 5, 9]

This line uses the defined function to calculate and print the mode

print("Mode: ",statistics.mode(mylist))

This line uses the defined function to calculate and print the median

print("Median: ",statistics.median(mylist))

This line uses the defined function to calculate and print the mean

print("Mean: ",statistics.mean(mylist))

You might be interested in
How can I make my Wi-Fi signal fast? I am going through my exam but my Wi-Fi is not supporting plz help.
9966 [12]

Answer: Maybe try to move router.

Explanation:

8 0
3 years ago
Express 42 as a product  of its prime factor​
salantis [7]
The only way to write 42 as the product
of primes.

Except to change the order of the factors is
2 × 3 × 7. We call 2 × 3 × 7 the prime factorization of 42.
6 0
3 years ago
Read 2 more answers
I can’t get answers because the ads won’t load help me
Flura [38]

Answer: Get better wifi

Explanation: This maybe a router problem, Go to your router and reset it by unplugging the power chord, After 30 seconds plug it back in and wait for your wifi to start back up. Your ads should load now. Have a good day.

7 0
3 years ago
I'm trying to network two laptops together using ethernet cable but it isn't working. Why isn't it working
sladkih [1.3K]

Yes the ansewer is c bc you can look it up!

8 0
3 years ago
What is a sign that content is
Sidana [21]
D. All of the above
7 0
4 years ago
Read 2 more answers
Other questions:
  • Which of the following techniques has to do with how the people who make the commercial manipulate the way it looks?
    8·1 answer
  • How do you create a reference page in apa format with all websites?
    5·1 answer
  • What would be a situation in which you could use an Excel chart to present your data?
    11·2 answers
  • The tools that cyber criminals often use, including computer viruses, worms, trojan horses and spyware, are called __________. q
    5·1 answer
  • Web 2.0 has led to a shift just from consuming content towards what
    6·1 answer
  • If you have a document that is relevant to more than one folder in your computer what should you do?
    8·1 answer
  • Using truth table, prove that:<br><br> (A + B). C = (A . C)+ (B .C) ?
    7·1 answer
  • In the function below, use a function from the random module to return a random integer between the given lower_bound and upper_
    10·1 answer
  • Several programmers write individual code modules that are used for different processes in a vehicle. Individual tests have alre
    13·1 answer
  • Private void finishMap()
    7·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!