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
Taya2010 [7]
3 years ago
15

You are to create a program using Python that asks the user for a nonnegative number, then computes the mean and variance using

the above given online update formulas which should be displayed on the console screen. The program should end when a user enters a negative number.
Computers and Technology
1 answer:
Alik [6]3 years ago
7 0

Answer:

# In the new version of python is available the functions mean() an variance()

# In the module of statistics

i = 0 #Var to input the elements

l = [] #Var to store the elements on a list

while(i>0):

    print("In put a positive number to add in the list or negative to exit ")

    i = input()

    l.append(i)

    print("The mean of the all elements is: " + mean(l) )

    print("The variance of the all elements is: " + variance(i) )

Explanation:

At present, you can use in the <em>news python's verison</em> e.g. (python 3.7) the <em>statistics module</em> and use functions like <em>mean(), variance(), stdev()</em> and many others.

In the first step you create two variables, i to recieve the inputs of a loop and l to store all the elements recieved in the<em> i</em> variable. after that you pass as an argument the list that you stored before and get the <em>mean()</em> and <em>variance()</em> of the all elements in the list.

I hope it's help you.

You might be interested in
Create an array named itemDescription containing the following item descriptions:
Lelu [443]

Answer:

var itemDescription = ["1975 Green Bay Packers Football (signed), Item 10582", "Tom Landry 1955 Football Card (unsigned), Item 23015", "1916 Army-Navy Game, Framed Photo (signed), Item 41807", "Protective Card Sheets, Item 10041"];

Explanation:

The following solution will work with javascript. Here we've stored different items in a variable named itemDescription.

8 0
3 years ago
A hardware compatibility list recommends striping with double parity as storage for an application. In a test environment, a tec
riadik2000 [5.3K]

Answer:

RAID level 5 can be used to compensate a limited number of available disks.

Explanation:

There are two type of RAID

  • Software RAID
  • Hardware RAID

Software RAID

deliver services form the host.

Hardware RAID

provides hardware services.

RAID has levels

0, 1, 5, 6, and 10

RAID 0, 1, and 5 work on both HDD and SSD media,

4 and 6 also work on both media.

RAID 0 :Striping

In this level minimum of two disks,RAID 0 split the file strip the data.Multiple hard drive are used to split the data.

RAID 1 : Mirroring

In this level Minimum two disk require and provide data tendency.

RAID 5 :Stripping with parity

Parity is a binary data.RAID system calculate the value which system used to recover the data.

Most RAID system with parity function store parity blocks.

RAID 5 combines the performance of RAID 0 with redundancy of RAID 1.

RAID 5 level should minimize the fault tolerance.

4 0
3 years ago
A normal HDMI signal has a colour depth of 8 bits per each of RGB colour. The maximum number
Marysya12 [62]

Answer: B

Explanation:

if each color can be represented as 8 bits and you have 3 colors total that would mean you would need 24 bits to represent the entirety of the RGB spectrum. And each bit can either be on or off so you have two choices for each one. So the total amount of colors you can have for 8bit RGB would be 2^{24} which is 16,777,216.

6 0
3 years ago
A computer with the ability to store instructions and do the job when requested by the operator, this type of computer had a spe
Sindrei [870]

Answer:

software's......................

8 0
2 years ago
Write a program that takes in a positive integer as input, and outputs a string of 1's and 0's representing the integer in binar
MAXImum [283]

Answer:

thats what i was about to ask. im not sure

Explanation:

sorry   '-'

3 0
3 years ago
Other questions:
  • If a computer is capable only of manipulating and storing integers, what di themselves? How are these difficulties overcome
    13·1 answer
  • A ___________ is similar to Computer Integrated Manufacturing, but is based much more on standard reusable application software
    5·1 answer
  • Discussion Six: Code of Ethics IT workers have many different relationships, including those with employers, clients, suppliers,
    7·1 answer
  • A software process describes the interrelationship among the phases by expressing their order and frequency, but does not define
    14·1 answer
  • Int a = 1; int b = 0; int c = -1; if ((b + 1) == a) { b++; c += b; } if (c == a) { a--; b = 4; }
    7·1 answer
  • Why are object-oriented languages very popular?
    11·2 answers
  • Users who are connecting to an NLB cluster have been complaining that after using the site for a few minutes they are prompted t
    15·1 answer
  • QueSUUN TU
    15·1 answer
  • How do you delete questions you asked?
    7·2 answers
  • What types of things were often NOT captured in early photographs?
    7·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!