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
VLD [36.1K]
3 years ago
8

Create a set of functions that compute the mean, median, and mode of a set of

Computers and Technology
2 answers:
zepelin [54]3 years ago
5 0

Refer to the attachment.

Language used=Python

Sauron [17]3 years ago
3 0

Answer:

Create a set of functions that compute the mean, median, and mode of a set of

numbers. Section 5.4 - Example: Using a List to Find the Median of a Set of Numbers

provides a simple algorithm for calculating the median for a set of numbers. Each

Function should expect a list of numbers as an argument and return a single number

Each function should return O if the list is empty. Include a main function that tests

he three statistical functions with a given list. Do not use the statistics or math

nodules to create the functions. The functions must be created by you.

You might be interested in
The following is the pseudocode for which type of algorithm? For maxElement = each subscript in the array, from the last to the
meriva

Answer:

The answer is "bubble sort".

Explanation:

Bubble sort is an algorithm that is used for sorting numbers. This algorithm provides a comparative method that compares each couple of identical elements and swaps elements if they're not in order.

  • It will not work for big data sources.
  • Its avg complexity and the worst case is O(n2) not work for big data. In O(n2), n is related to the number of objects.
4 0
3 years ago
Your boss bought a new printer with a USB 3.0 port, and it came with a USB 3.0 cable. Your boss asks you:
postnew [5]

Answer:

Will the printer work when I connect the printer's USB cable into a USB 2.0 port on my computer:

b. Yes, but at the USB 2.0 speed.

Explanation:

  • The option a is not correct as we can use 2.0 port also for this purpose but not only 3.0.
  • The option b is correct as we can use 2.0 USB Port for 3.0 USB but the speed will remain that of 2.0 USB.
  • The option c is incorrect as  because the speed is dependent on the speed of port.
  • The option d is incorrect as because USB can have speed of 2.0 or 3.0 depending upon the port and USB but can't have 1.1 speed.
8 0
3 years ago
Read 2 more answers
What role do computer play in law and order​
kirza4 [7]

Computers on Law & Order tracks computers and computer use through all 456 episodes of the American crime drama Law & Order.

Explanation:

5 0
3 years ago
Why do i keep losing points in brainly.com and how do you lose it?
kati45 [8]

Answer:

because you are asking questions like this

Explanation:

when you ask questions you lose points

6 0
3 years ago
Read 2 more answers
Create an application containing an array that stores eight integers. The application should call five methods that in turn (1)
Butoxors [25]

Answer:

package b4;

public class ArrayMethodDemo {

public static void main(String[] args) {

 // Create an array to store 8 random integers.

 int[] integernumbers = { 3, 4, 6, 9, 5, 6, 7, 2 };

 // Call the display method to show the elements in the array.

 display(integernumbers);

 // Call the method to display the elements in reverse order.

 displayReverse(integernumbers);

 // Call the method to find the sum of the elements.

 sum(integernumbers);

 // Call the method to display all elements less than a limiting value, say 5.

 lessThan(integernumbers, 5);

 // Call the method to display all elements greater than the average of the array

 // elements.

 higherThan(integernumbers);

}

// Method to display the elements in the array.

// The method receives only a single argument which is the array.

// Loop through the array and at every cycle, print out each element

public static void display(int[] arr) {

 System.out.print("All integers in the array : ");

 for (int i = 0; i < arr.length; i++) {

  System.out.print(arr[i] + " ");

 }

 System.out.println();

}

// Method to display the elements in the array in reverse order

// The method receives only a single parameter which is the array

// Loop through the array starting at the last index

// At every cycle, print out the elements in the array

public static void displayReverse(int[] arr) {

 System.out.print("All integers in the array in reverse : ");

 for (int i = arr.length - 1; i >= 0; i--) {

  System.out.print(arr[i] + " ");

 }

 System.out.println();

}

// Method to print out the sum of the elements in the array.

// The method receives only a single parameter which is the array.

// Declare a variable called sum to hold the sum of the elements

// Initialize sum to zero

// Loop through the array and cumulatively add each element to sum

// Print out the sum at the end of the loop

public static void sum(int[] arr) {

 int sum = 0;

 for (int i = 0; i < arr.length; i++) {

  sum += arr[i];

 }

 System.out.println("The sum of the integers in the array is " + sum);

}

// Method to print all values in the array that are less than a limiting

// argument.

// The method has two parameters - the array and the limiting argument.

// Loop through the array and at every cycle,

// check if the current array element is less than the limiting argument.

// If it is, print it out. Else continue

public static void lessThan(int[] arr, int limitingargument) {

 System.out.print("All values less than the limiting argument (" + limitingargument + ") are: ");

 for (int i = 0; i < arr.length; i++) {

  if (arr[i] < limitingargument) {

   System.out.print(arr[i] + " ");

  }

 }

 System.out.println();

}

// Method to print all values in the array that are higher than the average of

// the array.

// The method has one parameter - the array.

// First, calculate the average of the array elements.

// Loop through the array and at every cycle,

// check if the current array element is greater than the average.

// If it is, print it out. Else continue

public static void higherThan(int[] arr) {

 int sum = 0;

 for (int i = 0; i < arr.length; i++) {

  sum += arr[i];

 }

 double average = sum / arr.length;

 System.out.print("All values higher than the calculate average (" + average + ") is ");

 for (int i = 0; i < arr.length; i++) {

  if (arr[i] > average) {

   System.out.print(arr[i] + " ");

  }

 }

 System.out.println();

}

}

Explanation:

The program has been written in Java.

Please go through the comments in the code for explanation.

The source code has also been attached to this response.

Hope this helps!

Download java
3 0
3 years ago
Other questions:
  • All phones must have a way of making and then terminating a connection to the phone network; however the exact procedure for doi
    6·1 answer
  • When a process becomes digital, it often becomes cheaper and the workflow becomes simpler. True False
    5·2 answers
  • Are mechanical keyboards more expensive than membrane keyboards?
    9·2 answers
  • which one of these steps describe saving a newly created file. click on the save icon. minimize the file. name the file. select
    12·2 answers
  • Siobhan is going to create a dialog box for a new application and while she has been a user of dialog boxes for a long time, she
    10·1 answer
  • The purpose of the align phase is to align your team with ______.
    9·1 answer
  • What year did Forethought, Inc. release version 1.0 of PowerPoint
    13·1 answer
  • Which statement best describes 'abstraction'? *
    5·1 answer
  • Green Fields Landscaping Company sells evergreen trees which are priced by height. Customers have a choice of purchasing a tree
    15·1 answer
  • Mohammed’s parents learn that his classmates have begun sending him text messages making fun of his heritage. Mohammed says he’s
    5·2 answers
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!