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]
3 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]3 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
In a bubble sort for a list of length n &gt;= 2, in each iteration, the first step is to compare_______.
Hunter-Best [27]

Answer:

the consecutive two elements and swap them based on the value which is larger if we go for ascending order

Explanation:

bubble sort compares 2 consecutive elements of the list and swap them. in one iteration one value will be placed correctly depending on the sorting order either ascending or descending

7 0
3 years ago
Monica and Tyrell agree upon the main problem they are facing as a team. What is the next step to finding a win-win solution? Ag
Pani-rosa [81]
Brainstorm possible solutions 
7 0
4 years ago
Read 2 more answers
What. is. a. gradient?​
pashok25 [27]

Answer:

Gradient, in mathematics, a differential operator applied to a three-dimensional vector-valued function to yield a vector whose three components are the partial derivatives of the function with respect to its three variables. The symbol for gradient is ∇.

Explanation:

4 0
3 years ago
Read 2 more answers
CAN SOMEONE PLEASE HELP ME WITH WEB DESIGN!!!!! ILL GIVE THE BRAINLIEST AND 99 POINTS!!!!!!
sineoko [7]

i have made it whats ur email i can  it to you. all i can say is its a google page and it took me forever

7 0
3 years ago
Explain different types of secondary memory of computer system<br>​
Westkost [7]

<em>Answer:</em>

<em>There are three main types of secondary storage in a computer system: solid state storage devices, such as USB memory sticks. optical storage devices, such as CD, DVD and Blu-ray discs. magnetic storage devices, such as hard disk drives.</em>

<em>Explanation:</em>

6 0
2 years ago
Other questions:
  • There is the Iphone MAX, Iphone XR and Iphone XS. which iphone is the very NEWEST and which one do you recommend? explain.
    5·2 answers
  • You are trying to troubleshoot a desktop power supply issue using a voltmeter. Which of the following options are the MOST commo
    6·1 answer
  • Lucy has to move data from column A to column N in a worksheet. Which keys should she select to move data in the same worksheet?
    9·2 answers
  • A Cisco Catalyst switch has been added to support the use of multiple VLANs as part of an enterprise network. The network techni
    5·1 answer
  • Greg wants to check the amount of requests his website receives. What test can he use?
    6·1 answer
  • You are responsible for a rail convoy of goods consisting of several boxcars. You start the train and after a few minutes you re
    8·1 answer
  • Explain the integer and float datatypes with example.<br><br>​
    11·1 answer
  • P*********** is considered a serious social problem justify this statement​
    15·2 answers
  • During boom times, which of the
    5·1 answer
  • How does accenture generate value for clients through agile and devops?
    6·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!