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
MrRa [10]
3 years ago
10

For this problem, you will write a function standard_deviation that takes a list whose elements are numbers (they may be floats

or ints), and returns their standard deviation, a single number. You may call the variance method defined above (which makes this problem easy), and you may use sqrt from the math library, which we have already imported for you. Passing an empty list to standard_deviation should result in a ZeroDivisionError exception being raised, although you should not have to explicitly raise it yourself.
Computers and Technology
1 answer:
Evgesh-ka [11]3 years ago
3 0

Answer:

  1. import math  
  2. def standard_deviation(aList):
  3.    sum = 0
  4.    for x in aList:
  5.        sum += x  
  6.    
  7.    mean = sum / float(len(aList))
  8.    sumDe = 0
  9.    for x in aList:
  10.        sumDe += (x - mean) * (x - mean)
  11.    
  12.    variance = sumDe / float(len(aList))
  13.    SD = math.sqrt(variance)
  14.    return SD  
  15. print(standard_deviation([3,6, 7, 9, 12, 17]))

Explanation:

The solution code is written in Python 3.

Firstly, we need to import math module (Line 1).

Next, create a function standard_deviation that takes one input parameter, which is a list (Line 3). In the function, calculate the mean for the value in the input list (Line 4-8). Next, use the mean to calculate the variance (Line 10-15). Next, use sqrt method from math module to get the square root of variance and this will result in standard deviation (Line 16). At last, return the standard deviation (Line 18).

We can test the function using a sample list (Line 20) and we shall get 4.509249752822894

If we pass an empty list, a ZeroDivisionError exception will be raised.

You might be interested in
Identify the selector in the following CSS code:
SashulF [63]

Answer:

The right answer is: Option A. h3

Explanation:

The purpose of using selectors in CSS is to find the elements in the HTML page to which the formatting will be applied.

Different type of selectors are used in CSS.

In the given code, h3 is the selector.

All the <h3> elements on the page will be of orange color and will have font size 12.

Hence,

The right answer is: Option A. h3

6 0
3 years ago
I have science project competition. From where can i buy the parts i dont know any nearby place
dangina [55]
Uuuhh how bouut Walmart or anywere u want really

6 0
3 years ago
You have just assembled your first PC. You hit the power button and the computer turns on. As the computer runs through POST, it
Paha777 [63]

Answer:

Explanation:

If the HDD is spinning, this means that the power cable is correctly connected and that the drive is receiving power and powering on. However, this does not mean that the HDD is functioning correctly and reading the information. Therefore, the next logical step would be to check the SATA cable that connects the drive to the motherboard. The cable may be broken or maybe the SATA slot on the motherboard. Switch out the cables and plug it into another slot. If this does not work, then it may be that the HDD is broken. Multiple Beeps can also mean that the RAM or CPU is not plugged in correctly or broken.

6 0
3 years ago
Identify the components of the enveloped virus budding process
Elina [12.6K]

The components of the enveloped virus budding process are:

  • lipid bilayers
  • fission event
  • Glycosylated (trans-) membrane proteins.

<h3>What is the case of the virus about?</h3>

Virus budding in general is known to be a term that connote the scattering or disturbance of a cellular membrane and it is one away from the cytoplasm.

Note that it is said to be the envelopment of the viral capsid and this is done by one or more lipid bilayers that can be seen in the viral membrane glycoproteins, and it is one where a fission event takes place.

Hence The components of the enveloped virus budding process are:

  • lipid bilayers
  • fission event
  • Glycosylated (trans-) membrane proteins.

Learn more about virus from

brainly.com/question/26128220

#SPJ1

3 0
1 year ago
software that instructs the computer how to run applications and controls the display/keyboard is known as the what?
Tomtit [17]
<span>The software that instructs the computer how to run applications and controls the display /keyboard is known as DRIVERS software, A driver is a software program that enables a specific hardware device to work with a computers operating system. Drivers may be required for internal components such as video cards and optical media drives.</span>
7 0
3 years ago
Other questions:
  • You can create a ____ partition to hold files that are created temporarily, such as files used for printing documents (spool fil
    11·1 answer
  • How to find i with superposition method
    8·1 answer
  • A technician is configuring a new SOHO multifunction wireless router at a customer's location to provide network access to sever
    7·1 answer
  • Different organizations implement different Information Systems base on their core business operations. explain
    14·1 answer
  • Which of the following is true of how packets are sent through the Internet?
    11·2 answers
  • Write a program named as calcPrice.c that formats product information entered by the user and calculate the total amount of purc
    5·1 answer
  • The block of code below is supposed to display “multiple of 5” if the positive number value is in fact a multiple of 5
    8·1 answer
  • Which are examples of types of audio media that can support a presentation? Check all that apply.
    14·2 answers
  • Where would you go to access frequently used icons?
    12·2 answers
  • Phân tích cạnh tranh của cocacola và pepsi
    5·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!