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
geniusboy [140]
3 years ago
10

In statistics the mode of a set of values is the value that occurs most often. Write a program that determines how many pieces o

f pie most people eat in a year. Set up an integer array that can hold responses from 30 people. For each person, enter the number of pieces they say they eat in a year. Then write a function that finds the mode of these 30 values. This will be the number of pie slices eaten by the most people. The function that finds and returns the mode should accept two arguments, an array of integers, and a value indicating how many elements are in the array.

Computers and Technology
1 answer:
Feliz [49]3 years ago
6 0

Answer:

  see below

Explanation:

The program of interest is the function "findMode[x, n]" in the attached. It is written the Wolfram Language of Mathematica.

The basic idea is that the data in the array is sorted. The sorted array is partitioned into sets of identical elements, and the number in each of those sets is counted. The maximum of those counts is the mode. The location of the maximum count corresponds to the location of the set having that count. We use that location information to pull out the mode value(s).

If there is more than one mode, all are reported.

__

An example data array is provided, along with the program output.

You might be interested in
Glenda operates an Airbnb business in which she rents her apartment for $150us per night. There is a mandatory deposit of $50 do
inysia [295]

Answer:

Explanation:

There would be allaround 30 on the side.

8 0
2 years ago
Tim is in charge of the upcoming interschool baketball tournamnent. He wants to arrange all of the teams and their members in al
zalisa [80]
I think the answer is C.
7 0
2 years ago
What helps companies and organizations to target masses of people, provide 24/7 services, and deliver better marketing in a chea
Sever21 [200]
The money their making
6 0
3 years ago
write a loop that reads positive integers from stands input and that terinated when it reads an interger that is not positive af
gtnhenbr [62]

Loop takes only positive numbers and terminates once it encounters a negative numbers.

Answer and Explanation:

Using javascript:

Var positiveInt= window.prompt("insert positive integer");

While(positiveInt>=0){

Alert("a positive integer");

Var positiveInt= window.prompt("insert positive integer");

}

Or we use the do...while loop

Var positiveInt= window.prompt("insert positive integer");

do{

Var positiveInt= window.prompt("insert positive integer");

}

While (positiveInt>=0);

The above program in javascript checks to see if the input number is negative or positive using the while loop condition and keeps executing with each input until it gets a negative input

5 0
2 years ago
Linda is training to become a certified network design expert and consultant. While researching about the process of cellular ra
mel-nik [20]

Answer:

a. The cell tower forwards the call to the wireless provider's Mobile Telephone Switching Office

Explanation:

When a cell phone user begins to make a call, it is picked up by the cell tower located in the cell in which the cell phone is located and that belongs to the user's wireless provider. The next step in this process is that the cell tower forwards the call to the wireless provider's Mobile Telephone Switching Office.

8 0
2 years ago
Other questions:
  • Does a soda vending machine Give reciepts?<br><br>need for computer science hw
    7·2 answers
  • Explain how to implement two stacks in one array A[1..n] in such a way that neither stack overflows unless the total number elem
    7·1 answer
  • A financially stable person is able to
    12·2 answers
  • The most fundamental components of storage that users interact with are the:
    11·1 answer
  • You are purchasing several PC systems that will be used as thin clients in a large organization. Which hardware selection criter
    9·1 answer
  • Lamp is an acronym for a complete solution of open source software that goes together to build a general purpose web server. whi
    13·1 answer
  • Eliza needs to share contact information with another user, but she wants to include only certain information in the contact. Wh
    9·2 answers
  • Why are mobile apps often easier to develop than desktop apps?
    11·1 answer
  • Which letter shows the ball when it has the maximum kinetic energy
    15·1 answer
  • Part of an algorithm which is repeated for fixed number of times is classified as.
    13·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!