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
egoroff_w [7]
3 years ago
13

Professor Zak allows students to drop the four lowest scores on the ten 100 point quizzes she gives during the semester. Design

an apllication that accepts a student name and 10 quiz scores. Output the students name and total points for the students six highest scoring quizzes
Computers and Technology
1 answer:
lana66690 [7]3 years ago
4 0

Answer:

Explanation:

Let's do this in Python, we will accept 2 arguments, the student name and an array of the 10 scores. The function would sort the scores out, get the last 6 scores, take the sum and finally out put them with the student name:

def total_six_highest_score(name, scores):

    scores.sort()

    highest_six_scores = scores[4:]

    total_highest = sum(highest_six_scores)

    return name, total_highest

You might be interested in
A computer scientist from the 1960's who developed the mouse, computer networking, and used a small musical keyboard to control
PIT_PIT [208]
Steve Jobs im pretty sure
7 0
3 years ago
Instructions: Use the tables below to answer the questions that follow:
Svet_ta [14]

Answer:

same as above....................

3 0
2 years ago
The ArrayList class contains a trim method that resizes the internal array to exactly the capacity. The trim method is intended
andreev551 [17]

Answer:

public void trimToSize() {

modCount++;

if (size < elementData.length) {

elementData = (size == 0)

? EMPTY_ELEMENTDATA

: Arrays.copyOf(elementData, size);

}

}

Now, the running time for copyOf() function is O(N) where N is the size/capacity of the ArrayList. Hence, the time complexity of trimToSize() function is O(N).

Hence, the running time of building an N-item ArrayList is O(N^2).

Please find the sample code below.

CODE

==================

import java.util.ArrayList;

public class Driver {

  public static void main(String[] args) throws Exception{

      int N = 100000;

      ArrayList<Integer> arr = new ArrayList<>(N);

     

      long startTime = System.currentTimeMillis();

      for(int i=0; i<N; i++) {

          arr.add(i);

          arr.trimToSize();

      }

      long endTime = System.currentTimeMillis();

      double time = (endTime - startTime)/1000;

      System.out.println("Total time taken = " + time + " seconds.");

  }

}

Explanation:

5 0
3 years ago
What is the function of a header when writing HTML
marusya05 [52]
The Function of a header is that it makes your TEXT LOOK BIGGER

5 0
3 years ago
URGENTT 2 SIMPLE EASY QUESTIONS PLZZ HELP ION UNDERSTAND COMPUTERR ILL GIVE U BRAINLEST
nika2105 [10]

Answer:

I'll happy to help

Explanation:

Please make your clear. I couldn't understand!

8 0
2 years ago
Read 2 more answers
Other questions:
  • Which string method counts the number of characters in a string?
    5·1 answer
  • In Windows Vista, which location contains the Printer link?
    8·2 answers
  • "The ____________________ function is a logical function that returns a TRUE value if any of the logical conditions are true and
    14·1 answer
  • For the questions below, consider a class called ChessPiece. This class has two instance data, String type and int player. The v
    13·1 answer
  • Place the steps in order to link and place text into the document outline, effectively creating a master document.
    8·1 answer
  • Select the correct statement(s) regarding partial mesh networks.
    5·1 answer
  • Write a function that accepts an argument for a persons name. The method should loop through the number of characters in the nam
    7·1 answer
  • Why did hockey champion Haley wickenheiser feel angry after the Bach said the IOC would make a decision in the next month?
    8·1 answer
  • In the following code: function drawCircle(radius, x, y, color) { var circle = new Circle(radius); circle.setPosition(x, y); cir
    7·1 answer
  • When you start a new blank document, you begin typing at the
    6·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!