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

Write a code that takes numbers from the user as a list. (User can enter as many numbers as he wants). Then, find mean and stand

ard deviation of this list of numbers.
Sample Output 
Enter numbers: 1 2 3 5 4 2 3 2 1 5 8 4 5
The mean is 3.4615384615384617
The standard deviation is 1.983909634004895

Computers and Technology
1 answer:
8090 [49]3 years ago
7 0

nums = list(map(int, input().split()))

mean = sum(nums)/len(nums)

print("The mean is",mean)

values = 0

for x in nums:

   values += abs(x - mean)**2

print("The standard deviation is",(values / (len(nums)-1))**0.5)

I wrote my code in python 3.8. I hope this helps.

You might be interested in
Blank Are input instructions you give to a computer
kotegsom [21]

Explanation:

A computer is a machine that can be programmed to accept data (input), process it into useful information (output), and store it away (in a secondary storage device) for safekeeping or later reuse. The processing of input to output is directed by the software but performed by the hardware.

4 0
2 years ago
The cyclical, multistep process by which designers and engineers design, build, and taste a new product is called:
zzz [600]
The answer is Design Process.  <span>The cyclical, multistep process by which designers and engineers design, build, and taste a new product is called Design Process.   </span><span>There are multiple steps, including exploring, designing, planning, making, testing, and revising.</span>
7 0
3 years ago
Which advertising medium has the widest reach on a global front?
lesya [120]

Answer: B

The internet would allow businesses to easily expand globally with the help of social media and the ever expanding resources being poured onto the internet, reaching customers anywhere in the world.

8 0
3 years ago
Write a program that calculates and displays the amount ofmoney available in a bank account that initially has $8000 deposited i
Leviafan [203]

Answer:

Written in Python

import math

principal = 8000

rate = 0.025

for i in range(1, 11):

    amount = principal + principal * rate

    principal = amount

    print("Year "+str(i)+": "+str(round(amount,2)))

Explanation:

This line imports math library

import math

This line initializes principal amount to 8000

principal = 8000

This line initializes rate to 0.025

rate = 0.025

The following is an iteration from year 1 to 10

for i in range(1, 11):

    This calculates the amount at the end of the year

    amount = principal + principal * rate

    This calculates the amount at the beginning of the next year

    principal = amount

    This prints the calculated amount

    print("Year "+str(i)+": "+str(round(amount,2)))

6 0
3 years ago
Write a program with class name Digits that prompts the user to input a positive integer and then outputs the number reversed an
mr Goodwill [35]

Answer:

Written in Python:

inputnum = int(input("User Input: "))

outputnum = 0

total = 0

while(inputnum>0):

     remainder = inputnum % 10

     outputnum = (outputnum * 10) + remainder

     inputnum = inputnum//10

     total = total + remainder

print("Reverse: "+str(outputnum))

print("Total: "+str(total))

Explanation:

This prompts user for input

inputnum = int(input("User Input: "))

This initializes the reverse number to 0

outputnum = 0

This initializes total to 0; i.e. sum of each digit

total = 0

The following iteration gets the reverse of user input

<em>while(inputnum>0): </em>

<em>      remainder = inputnum % 10 </em>

<em>      outputnum = (outputnum * 10) + remainder </em>

<em>      inputnum = inputnum//10 </em>

<em>      This adds each digit of user input</em>

<em>      total = total + remainder </em>

This prints the reversed number

print("Reverse: "+str(outputnum))

This prints the sum of each digit

print("Total: "+str(total))

7 0
3 years ago
Other questions:
  • What is a technology that exists inside another device called
    11·1 answer
  • A raised dot (ú) shows where the enter key was pressed. true or false.
    13·1 answer
  • Which is not an element of photography? a Cropping b Height c Directional Lighting d Framing
    11·1 answer
  • How would you reduce or minimize the size of a "file"?
    5·1 answer
  • Why is distance learning better
    12·2 answers
  • What sort of query is (strbucks]?
    14·1 answer
  • Describe the impact of improvement ls in technology and transportation on american citizens. ​
    7·1 answer
  • If i hit the delete key three times what will be left
    12·1 answer
  • RTOS stands for ______ Time Operating System.
    11·1 answer
  • When you create a new database using --------- , the database includes prebuilt tables and forms which you can populate with dat
    15·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!