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
Charra [1.4K]
3 years ago
11

Write the method public static doublell quizAverages (double (1 scores). which takes a 2D array of doubles that represent quiz s

cores for students in a course and returns an array of quiz averages. Specifically, each column represents a quiz, and each row represents a student in the class. Therefore, what the method returns is an array of column averages, essentially. Assume that all students take the same number of quizzes
Computers and Technology
1 answer:
Helga [31]3 years ago
8 0

Answer:

  1. import java.util.Arrays;
  2. public class Main {
  3.    public static void main(String[] args) {
  4.        double [][] studentScores = {
  5.                {78, 40, 97},
  6.                {89, 90, 68},
  7.                {70, 35, 88}
  8.        };
  9.        System.out.println(Arrays.toString(quizAverages(studentScores)));
  10.    }
  11.    public static double[] quizAverages(double [][] scores){
  12.        double average[] = new double[scores[0].length];
  13.        for(int col = 0; col < scores[0].length; col++){
  14.            double sum = 0;
  15.            for(int row =0; row < scores.length; row++){
  16.                sum += scores[row][col];
  17.            }
  18.            average[col] = sum / scores[col].length;
  19.        }
  20.        return average;
  21.    }
  22. }

Explanation:

The solution code is written in Java.

Firstly, create a static method that take one input parameter, double type two dimensional arrays and this method will return one array of average as required by question (Line 11).

In the method, declare a double type array and initialize its size with the length of the column of the input scores array (Line 12).

Create a double layer of for loop with outer loop to iterate through the column of the input score array and the inner loop to iterate through the row (Line 13-15). In the outer loop, create a sum variable to hold the value of summation for each column (Line 14). In the inner loop, increment the sum variable with the score in each row (Line 16). After finishing one inner loop cycle, the sum is divided by the length of column and assign it to an item of average array in outer loop before proceed to the next round of outer loop to repeat the same process (Line 18).

At last return the average array (Line 20).

We can test the method using a sample data (Line 4-8) and print out the output returned by the method (Line 9).  

You might be interested in
Identify the components of the enveloped virus budding process
Elina [12.6K]

The components of the enveloped virus budding process are:

  • lipid bilayers
  • fission event
  • Glycosylated (trans-) membrane proteins.

<h3>What is the case of the virus about?</h3>

Virus budding in general is known to be a term that connote the scattering or disturbance of a cellular membrane and it is one away from the cytoplasm.

Note that it is said to be the envelopment of the viral capsid and this is done by one or more lipid bilayers that can be seen in the viral membrane glycoproteins, and it is one where a fission event takes place.

Hence The components of the enveloped virus budding process are:

  • lipid bilayers
  • fission event
  • Glycosylated (trans-) membrane proteins.

Learn more about virus from

brainly.com/question/26128220

#SPJ1

3 0
2 years ago
You will locate a presentation online that focuses on your field (for example you might choose a TED talk focused on your field)
Bogdan [553]

Answer:

presentation: "How to stop screwing yourself over" A ted talk by  Mel, an American television host. She constructively used  presentation skills such as clear verbal communication, humor, story telling  and of course, good preparation and research to present in the video, the video has more than 22 million views.

Explanation:

verbal communication: She communicated in a clear and concise language to pass her message across to the audience. This  is a vital skill for a good presentation.

Humor: She was able to use humor to lighting the presetation atmosphere without derailing from the main point. Effective use of humor will increase audience attention during the presentation.

story telling: Everybody loves story, when stories that are related to the main point of the presentation are shared, it will instill the main of point of the presentation in the mind of the audience.

Good preparation and research: Adequate preparation is key to the success of any presentation. It allows the speaker to understand his or her audience before the actual presentation as well as get all need resources for the presentation.

8 0
3 years ago
Complete the sentence.
anastassius [24]

Answer:

Compilation

Explanation:

" <em>Python is an interpreted, high-level, general-purpose programming language. It is is dynamically typed and garbage-collected. </em>"

But first it does a compilation for a file with the extension `<em>.pyc</em>`, so the answer is compilation, even though <em>python</em> is being <em>interpreted</em>

8 0
3 years ago
(a) How many locations of memory can you address with 12-bit memory address? (b) How many bits are required to address a 2-Mega-
I am Lyosha [343]

Answer:

Follows are the solution to this question:

Explanation:

In point a:

Let,

The address of 1-bit  memory  to add in 2 location:

\to \frac{0}{1}  =2^1  \ (\frac{m}{m}  \ location)

The address of 2-bit  memory to add in 4 location:

\to \frac{\frac{00}{01}}{\frac{10}{11}}  =2^2  \ (\frac{m}{m}  \ location)

similarly,

Complete 'n'-bit memory address' location number is = 2^n.Here, 12-bit memory address, i.e. n = 12, hence the numeral. of the addressable locations of the memory:

= 2^n \\\\ = 2^{12} \\\\ = 4096

In point b:

\to Let \  Mega= 10^6

              =10^3\times 10^3\\\\= 2^{10} \times 2^{10}

So,

\to 2 \ Mega =2 \times 2^{20}

                 = 2^1 \times 2^{20}\\\\= 2^{21}

The memory position for '2^n' could be 'n' m bits'  

It can use 2^{21} bits to address the memory location of 21.  

That is to say, the 2-mega-location memory needs '21' bits.  

Memory Length = 21 bit Address

In point c:

i^{th} element array addresses are given by:

\to address [i] = B+w \times (i-LB)

_{where}, \\\\B = \text {Base  address}\\w= \text{size of the element}\\L B = \text{lower array bound}

\to B=\$ 52\\\to w= 4 byte\\ \to L B= 0\\\to address  = 10

\to address  [10] = \$ 52 + 4 \times (10-0)\\

                       =   \$ 52   + 40 \ bytes\\

1 term is 4 bytes in 'MIPS,' that is:

= \$ 52  + 10 \ words\\\\ = \$ 512

In point d:

\to  base \ address = \$ t 5

When MIPS is 1 word which equals to 32 bit :

In Unicode, its value is = 2 byte

In ASCII code its value is = 1 byte

both sizes are  < 4 byte

Calculating address:

\to address  [5] = \$ t5 + 4 \times (5-0)\\

                     = \$ t5 + 4 \times 5\\ \\ = \$ t5 + 20 \\\\= \$ t5 + 20  \ bytes  \\\\= \$ t5 + 5 \ words  \\\\= \$ t 10  \ words  \\\\

3 0
3 years ago
Which of these is NOT a type of spoofing? sending an e-mail that says it is from a certain bank but it is not
ArbitrLikvidat [17]

The option that is not  a type of spoofing is creating a fake website for a well-known business.

<h3>What is email spoofing?</h3>

Email spoofing is known to be a method  that is often used in spam and other forms of phishing attacks. This is often done to trick computer users to see that a message originate from a person or firm that they know.

Conclusively, The option that is not  a type of spoofing is creating a fake website for a well-known business as it is not what spoofing  is all about.

Learn more about spoofing from

brainly.com/question/23021587

#SJ1

3 0
2 years ago
Other questions:
  • What are chemical manufacturers required to provide to anyone who purchases or uses their chemicals for a work purpose? Select a
    8·2 answers
  • What can you do to keep safe when using a ladder?
    13·1 answer
  • • Suppose Host A wants to send a large file to Host B. The path from Host A to Host B has three links, of rates R1= 500 kbps, R2
    15·1 answer
  • A search engine attempts to catalog every Web page by topic through the use of a ____
    10·1 answer
  • How does math help you determine the amount of watts a turbine produces?
    13·1 answer
  • This code snippet is intended to calculate the balance of an account after twenty years of gaining interest. Select the statemen
    6·1 answer
  • Ujqwgydft frrhyy4e uvbw vhrwbhv vbyrewblv?
    14·1 answer
  • Explain why cloud computing can be more complex than a traditional approach.
    8·1 answer
  • I need help pls help me
    8·1 answer
  • Which type of computer serves as the heart of the computing systems for many, perhaps most, major corporations and government ag
    12·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!