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
In linear​ programming, choices available to a decision maker are called
Aleks [24]
Havinh=g the software to do it all

6 0
3 years ago
How can you tell if a hacker has administrative access?
olga55 [171]
I don't think you can know because if the hacker is smart he or she will know to cover up their tracks
8 0
3 years ago
Read 2 more answers
A drive is small enough to be carried in one's pocket.
hjlf

Answer: Pen

Explanation:

4 0
3 years ago
How do you organize texts and numerical data? ​
777dan777 [17]

Numerical data represent values that can be measured and put into a logical order. Examples of numerical data are height, weight, age, number of movies watched, IQ, etc.

3 0
2 years ago
Sheet tabs can be renamed by____
Vinvika [58]

Answer:

The answer is D) Double-Clicking

Explanation:    

The question is a Microsoft Office Excel Question.

A sheet is also called a worksheet in Microsoft Office Excel. A sheet is a single page that holds its own collection of cells with which one can organize their data.

Sheets in Microsoft Office Excel spreadsheet can run into hundreds and hundreds and is usually visible a the bottom of the excel page as tabs.

By default, the tabs or sheets are named starting from the first as Sheet 1, Sheet 2, Sheet 3...etc.

By double-clicking on the tab, one is able to change the default name to any custom name the user choses.

Cheers!

3 0
3 years ago
Read 2 more answers
Other questions:
  • Are we too dependent on technology if yes then can you please explain?
    12·2 answers
  • The ____ shortcut keys remove character formatting. (points : 2) ctrl 0 (zero) ctrl i ctrl spacebar ctrl u
    8·2 answers
  • Two electronics technicians are looking at the representations of a silver atom and a copper atom in the figure above. Technicia
    10·1 answer
  • Ooooooooooooooooooooooooooooh im blinded by the lightssssssssss
    11·1 answer
  • Solve the following quadratic equation <br><br>y=6x^2-12x+1
    9·1 answer
  • What is an identified component of a software program that might allow a hacker or other intruder to gain entry and control of a
    10·2 answers
  • Which communication technology should you use if you need to connect three offices which are all within 3 miles of each other at
    6·1 answer
  • How do media and networks interact? A. Networks and media work in exactly the same way. B. Media are connected to networks that
    8·1 answer
  • EASY What does the Backspace key do?
    6·1 answer
  • Discuss the term internal control​
    12·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!