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
arsen [322]
2 years ago
9

Write a program named find_stats. py. accept ints from user until the user enters a 0. then calculate mean, median and standard

deviations of all entered values. display stats
Business
1 answer:
Fudgin [204]2 years ago
7 0

The program described above which calculates mean, median and standard deviations of all entered values is given below.

<h3>What is a program?</h3>

A program is a set of instructions that ensure that a predetermined or specific output is given by a computer.

The program labelled find_stas.py is given as follows:

# importing required libraries

import math

# creating a empty list named li

li = []

# iterate till while is true

while True:

#   getting user input making it int and store it in inp

   inp = int(input("Enter integer (0 to stop): "))

   # checks if inp is equals to 0

   if inp == 0:

       # stop the loop

       break

   # append inp in li

   li.append(inp)

n = len(li)

# calculating sum li using sum function  then dividing by n and store it in mean

mean = sum(li) / n

# dividing n by 2 and store it in indexes

index = n // 2

# if n modulus n equals 2

if n % 2:

   # sort the li and store the index position in median

   median = sorted(li)[index]

# otherwise

else:

   # store the result in media

   median = sum(sorted(li)[index - 1:index + 1]) / 2

# declaring d variable with value 0

d = 0

# calculating variance and store it in variance

variance = sum((x - mean) ** 2 for x in li) / (n - d)

# standard deviation

sd = math.sqrt(variance)

# display the output with the value of mean, median and sd

print("Mean : {}\nStandard Deviation : {}\nMedian : {}".format(mean, median, sd))

Learn more about programs:
brainly.com/question/26134656
#SPJ1



You might be interested in
Heels, a shoe manufacturer, is evaluating the costs and benefits of new equipment that would custom fit each pair of athletic sh
zhannawk [14.2K]

Answer:

3.11yrs

Explanation:

See attached file

4 0
3 years ago
PROJECT: SEGMENTS OF THE TRAVEL INDUSTRY There are six major sectors of the travel industry. Any community that wants to develop
8_murik_8 [283]

Answer:

Sector-specific associations.

Tourism and hospitality human resources organizations.

Training providers.

Educational institutions.

Government branches and ministries in land use, planning, development, environmental, transportation, and other related fields.

Economic development and urban planning offices.

hope this is the correct answer you need

6 0
3 years ago
The number of units that must be sold for the total revenue to equal the total cost is called the ____ quantity.
IRINA_888 [86]

The breakeven stabilization intersect quantity is the number of units that must be sold for the entire income to equal the total cost.

<h3>What is total income?</h3>

Total revenue is the overall sum of money received by a business through the sale of its products and services. Based on demand and price, it measures how successfully a company is generating revenue from its main operations.

Revenue is referred to as the money made by a company's main operations. It appears at the top of an income statement and is frequently referred to as the "top line. According to accounting standards, net income is defined as total revenue less total expenses for any given period.

To learn more about total income visit:

brainly.com/question/13000391

#SPJ4

7 0
2 years ago
When herman asks "any more recent employment history? eliot has been out of business for 20 years," is he violating the age disc
beks73 [17]
<span>No, Herman is not discriminating based on age so he is not violating the age discrimination in employment act. What he is doing is requesting recent employment history because the recent history given is at least 20 years old. This has nothing to do with the age of the applicant, which is what is necessary for there to be a discrimination, but all to do with whether the applicant has recent relevant experience.</span>
8 0
4 years ago
A preferred stock sells for $54.20 a share and has a market return of 9.68 percent. What is the dividend amount
kolbaska11 [484]

Answer:

$5.25

Explanation:

A preferred stock is sold at $54.20

The market return is 9.68%

Therefore the dividend amount can be calculated as follows

= 54.20 × 9.68/100

= 54.20 × 0.0968

= $5.25

Hence the dividend amount is $5.25

6 0
3 years ago
Other questions:
  • Daniel Franco, a free-lance gaming consultant and blogger, needed a new gaming system for his business. After some lengthy revie
    10·1 answer
  • a pea plant that has round seeds has the genotype Rr. it is crossed with a pea plant that has wrinkled seeds and the genotype rr
    11·1 answer
  • John h. harland company is a large company with 5,200 employees and almost $800 million in annual sales. the company is best kno
    9·1 answer
  • 1.the biggest problem when using metals or cowry shells for trading is____
    12·2 answers
  • Friendly’s Quick Loans, Inc., offers you “seven for nine or I knock on your door.” This means you get $7.00 today and repay $9.0
    10·1 answer
  • Excise and Sales Tax Calculations
    9·1 answer
  • A recent Small Business Administration study found that commercial banks provide between ________ percent of the credit availabl
    9·1 answer
  • Suppose that the government decides to issue tradable permits for a certain form of pollution.
    9·1 answer
  • A fast food restaurant that normally uses plastic utensils is considering switching to reusable metal utensils. In order to cond
    14·1 answer
  • What is the most likely reason some people avoid all carbohydrates in order to lose weight?
    10·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!