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]
4 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]4 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
Add me as a friend on Real pool 3D so we can play a round of pool!!!
Sloan [31]

I will but i have to wait till after 3;00 will you still be online by then. If not you can just friend me and message me when you are today

8 0
3 years ago
.Assume the following schedule for a set of three jobs, A, B, and C, with a single CPU. Assume that there is no i/o. --A runs fi
Fiesta28 [93]

Answer:

Check the explanation

Explanation:

Kindly check the attached images below to the see the step by step explanation to the question above.

7 0
4 years ago
1. What have you understood about the do's and don'ts inside the computer lab?
fiasKO [112]

Answer:

1.do=turn off machine after you are done using it

work quietly and ask permission before using

don't =bring any food or drinks

don't change computer settings

Explanation:

plz give me as brainlist question

7 0
3 years ago
Write a function named enterNewPassword. This function takes no parameters. It prompts the user to enter a password until the en
Mkey [24]
______________———-___________
7 0
3 years ago
Mecanismo que permite conocer si la persona que esta ingresando a un sistema es realmente quien deba y no un intruso
Tems11 [23]

Answer:

Sistemas de autenticación y seguridad de la información.

Explicación:

La seguridad de la información es un mecanismo que permite saber si la persona que está ingresando a un sistema es realmente quien debería y no un intruso. La seguridad de la información básicamente ayuda a prevenir el acceso no autorizado y permite que la única persona autorizada ingrese al sistema. Los sistemas de autenticación son el mecanismo de seguridad que se utiliza para proteger los datos y los sistemas. Estos sistemas de autenticación también ayudan a garantizar que los usuarios sean la persona autorizada o no.

4 0
3 years ago
Other questions:
  • 642<br> +277<br> What does 642+277
    7·1 answer
  • Asp.net is a Microsoft product?
    6·1 answer
  • Without protocols the information sent and received through the Internet would never reach its intended target and even if it di
    6·1 answer
  • Can someone help me out with this question?​
    9·1 answer
  • Which expression is equivalent to 3x + 3x + 3x?<br><br> From Performance Matters
    11·2 answers
  • Given the following snippet of code, answer the following two questions based on the code: typedef enum {Sun, Mon, Tue, Wed, Thu
    15·1 answer
  • TRUE OR FALSE - SQL language is used to query data in a Relational Database?
    5·1 answer
  • Kelly arrives for work at a restaurant at 5:00 p.m. Once there, she washes and chops vegetables, then sets aside ingredients and
    8·2 answers
  • Why is UPS necessary to connect with the computer​
    11·1 answer
  • Which of the following should be clicked to open Backstage View?
    7·2 answers
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!