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
To reduce inflation, the Federal Reserve _____ the money supply. This action also causes the economy to shrink.
Alex
The answer is (a.) increases

When there is an inflation which is a sustained increase in the level of prices for the goods and services in the economy, the Fed (Federal Reserve or Federal Reserve System) which it the central banking system will increase the money supply. When the interest rate increases, the money will go rare and causes the economy to shrink.
7 0
3 years ago
Read 2 more answers
How does the team know what to work upon during the iteration
Brilliant_brown [7]

Answer:

Based on the discussions during iteration planning, team members agree on what each would work on.

Explanation:

Iteration can be defined as the way in which a process is been repeated in order to generate a possibly outcomes and this occur in a situation where the sequence will approach some end point in which each repetition of the process will be a single iteration while the outcome of each iteration will then be the starting point of the next iteration.

Therefore the team know what to work upon during the iteration Base on the discussions during iteration planning in which the team members agree on what each of them would work on.

During the iteration planning, the team collectively make a decision on how much of the backlog actually they will commit to the iteration in which the committed backlog then is taken to the delivery during the next iteration which is why the goals or objectives of the iteration get determined on the basis of the work committed.

7 0
3 years ago
Which layout manager constructor call would be best-suited to create a telephone handset GUI which has three rows of three keys
Snezhnost [94]

Answer:

The correct option : b. new GridLayout(4,3)

Explanation:

The total number of rows are 4 and total number of columns are 3.

So the total keys can be added is 4*3=12. This is suited for telephone keypad.

7 0
3 years ago
Windows hard disks can now use a variety of file systems, including FAT16, FAT32, ____, and Resilient File System.
marysya [2.9K]

Answer:

NTFS.

Explanation:

3 0
3 years ago
What is digital revolution?
oksano4ka [1.4K]
The Digital Revolution refers to the advancement of technology from analog electronic and mechanical devices to the digital technology available today. The era started to during the 1980s and is ongoing. ... The Digital Revolution is sometimes also called the Third Industrial Revolution.
5 0
3 years ago
Other questions:
  • Which best describes the benefits of renting a home?
    10·2 answers
  • To increase the view of a document on the screen, use the _____. View icon Zoom slider full-screen reading boldface font
    9·1 answer
  • Write an SQL statement to list the Name of employees who have worked on a property in New York .
    7·1 answer
  • Gina is driving her car down the street. She has a teddy bear sitting on the back seat. A dog runs in front of Gina's car, so sh
    15·2 answers
  • What is the different between ethical and legal issues?​
    6·1 answer
  • How do you change the name on your brainly account?
    12·1 answer
  • Write a program that first reads in the name of an input file, followed by two strings representing the lower and upper bounds o
    8·1 answer
  • What is the term for an understanding about the processes that underlie memory, which emerges and improves during middle childho
    7·2 answers
  • Please help it would mean to world to me❤️ (WORD)
    13·1 answer
  • How is primary storage different from secondary storage? Select the TWO correct statements. The CPU can only read and write data
    12·2 answers
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!