answer.
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
Masteriza [31]
2 years ago
7

Write a function called st_dev. St_dev should have one #parameter, a filename. The file will contain one integer on #each line.

The function should return the population standard #deviation of those numbers.
Computers and Technology
1 answer:
kodGreya [7K]2 years ago
6 0

Answer:

  1. import statistics
  2. def st_dev(file_name):
  3.    with open(file_name) as file:
  4.        data = file.readlines()
  5.        numList = []
  6.        for x in data:
  7.            numList.append(int(x))
  8.        
  9.        return statistics.pstdev(numList)
  10. print(st_dev("text1.txt"))

Explanation:

The solution code is written using Python.

To ease the calculation task, we can import Python statistics module to use the pstdev method to calculate the population standard deviation of a list of numbers (Line 1).

Next, create a st_dev function that take single argument file_name (Line 3). In the function, it will open the input file and read the data line by line (Line 4-5). Create a for loop to traverse through each line of the data which is an integer and append it to numList (Line 7-8). We can pass the numList to pstdev method (Line 10) and return the resulting standard deviation value as output.

We test the function by passing a file which hold a list of integer values in each line (Line 12).

8

9

12

11

21

15

16

10

7

13

And the output we shall get is 4.019950248448356

You might be interested in
Why are computer manufacturers constantly releasing faster computers? how do computer users benefit from the increased speed?
Anastaziya [24]
<span>As programs and online activities have grown more robust and innovative, it has simultaneously required computer manufacturers to identify ways to make their devices faster to keep up with these changes. Users benefit immensely due to their ability to have boundless and efficient access to their various needs.</span>
8 0
1 year ago
Which is among the earliest formats of audio used in video games? A. MP3 B. wave table synthesis C. pulse code modulation D. MOD
solong [7]

Answer:

MOD

Explanation:

MOD audio file format is primarily used to represent music. It uses the .MOD file extension and has had popularity as background music for independent video games. It would be safe to say that MOD audio file extensions are the most widespread trackers that were used and are still being used in many computer games and demos.

0 0
1 year ago
Read 2 more answers
Suppose your company has decided that it needs to make certain busy servers faster. Processes in the workload spend 60% of their
vekshin1

Answer:

CPU need 50% much faster

disk need 100% much faster

Explanation:

given data

workload spend time CPU  = 60%

workload spend time I/O = 40%

achieve overall system speedup = 25%

to find out

How much faster does CPU need and How much faster does the disk need

solution

we apply here Amdahl’s law for the overall speed of a computer that is express as

S = \frac{1}{(1-f)+ \frac{f}{k} }      .............................1

here f is fraction of work i.e 0.6 and S is overall speed  i.e 100% + 25% = 125 % and k is speed up of component

so put all value in equation 1 we get

S = \frac{1}{(1-f)+ \frac{f}{k} }  

1.25 = \frac{1}{(1-0.6)+ \frac{0.6}{k} }  

solve we get

k = 1.5

so we can say  CPU need 50% much faster

and

when f = 0.4 and S = 125 %

put the value in equation 1

S = \frac{1}{(1-f)+ \frac{f}{k} }  

1.25 = \frac{1}{(1-0.4)+ \frac{0.4}{k} }  

solve we get

k = 2

so here disk need 100% much faster

7 0
1 year ago
An e-commerce client is moving from on-premise, legacy systems to a cloud-based platform. During the transition, the client is a
Talja [164]

The way in which this client is benefiting from switching to a cloud-based enterprise platform is in terms of<em><u> efficiency.</u></em>

An enterprise platform is a base upon which companies can<u> build on the technology they have</u>. Some of the many benefits of this include:

  • <em>Efficiency </em>
  • Simplicity
  • Expandability

and many more. A cloud-based enterprise platform allows a company to keep up to modern-day standards and stay competitive.

A cloud-based enterprise platform allows all of the users to access the data remotely, making work much more simple and removing the space limitations of on-site legacy systems, which allows the client to expand and hire new workers.

One of the ways in which this client is benefiting from switching to a <em>cloud-based enterprise platform</em> is in terms of efficiency. By removing the on-site model of work, this client will allow her workers to access the database and interchange information which other sectors all from a single server, <u>increasing efficiency greatly.</u>

To learn more visit:

brainly.com/question/24053883?referrer=searchResults

4 0
1 year ago
In the context of the components of a typical expert system, _____ is a software package with manual or automated methods for ac
Pani-rosa [81]

Answer:

knowledge acquisition facility

Explanation:

In the context of the components of a typical expert system, Knowledge acquisition facility is defined as that component of an expert system that is responsible for providing an effective and efficient medium for collecting and incorporating relevant information such as data, new rules, relationships and facts used by the expert system.

6 0
1 year ago
Other questions:
  • One of the most toxic components of a computer is the
    11·1 answer
  • Technician A says that the octane rating of gasoline is the measure of its antiknock properties. Technician B says that normal c
    5·1 answer
  • What are threats to computer system
    6·1 answer
  • An online game is played with two dice. In this context, explain what is meant by decomposition in a simple way.
    15·1 answer
  • python A year in the modern Gregorian Calendar consists of 365 days. In reality, the earth takes longer to rotate around the sun
    15·2 answers
  • Does the Boolean expression count &gt; 0 and total / count &gt; 0 contain a potential error? If so, what is it?
    8·1 answer
  • A U.S. social security number consists of a string of 9 digits, such as "444422333". Assume that input consists of a sequence of
    6·2 answers
  • Identify the articulation site that allows us to nod our head ""yes"".
    13·1 answer
  • Use the single-server drive-up bank teller operation referred to in Problems 1 and 2 to determine the following operating charac
    10·1 answer
  • Calvin is an aspiring graphic designer. He wants to achieve Adobe Certified Expert certification in software that will be helpfu
    9·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!