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
Harrizon [31]
3 years ago
14

A spreadsheet keeps track of student scores on all the exams in a course. Each row of the spreadsheet corresponds to one student

, and each column in a row corresponds to his/her score on one of the exams. There are r students and c exams, so the spreadsheet has r rows and c columns.Consider an algorithm that computes the total score on all exams for each student, and the average class score on each exam. You need to analyze the running time of this algorithm.A. What are the basic operations you would count toward the running time?B. What is the worst-case running time as a total count (not big O) of these basic operations?C. What is the big O running time?D. Is your algorithm linear, quadratic, or some other order?
Computers and Technology
1 answer:
vivado [14]3 years ago
7 0

Answer:

Check the explanation

Explanation:

A. The fundamental or basic operations are addition and division.

B. The total figure for each student (which starts at 0) will be included to c times. Given that there are r student totals, there are <em>r*c</em> additions for the totals. (An optional correct answer is <em>r*(c-1)</em> if you begin the accumulator with the initial item in a column, and perform <em>(c-1)</em> additions.)

Each exam average will be included to r times. In view of the fact that there are c exams, this gives another <em>c*r</em> additions.

All the exam average will be divided exactly once by the amount of students, c. So, c divisions.

C. <em>O(rc) </em>

D. LINEAR (Note: The Big O appears like a quadratic value, although the INPUT SIZE is rc, and the running time is linearly relative to the input size.)

You might be interested in
What is a wiki website?
expeople1 [14]

Answer:

A wiki website is a website we're people share ideas and information.

7 0
3 years ago
Write a recursive method called, doMyMath, which takes as input any positive integer and calculates the factorial (use comments
gulaghasi [49]

Answer:

def doMyMath(n):  

    if n == 1:  

         return n  

    else:  

         return n*doMyMath(n-1)  

Explanation:

This line defines the function

def doMyMath(n):  

This line checks if n is 1. If yes, it returns n (1)

    if n == 1:  

         return n  

If otherwise, it calculates the fibonacci recursively

    else:  

         return n*doMyMath(n-1)  

To call the function from main, you can use:

print(doMyMath(5))

or

num = int(input("Number: "))   --- This gets the number from user

print("Result: ",doMyMath(num)) --- This calculates the factorial

<em>This question is answered in Python</em>

6 0
3 years ago
Any BTS army here
kirill115 [55]
I am bts army unite

5 0
3 years ago
Read 2 more answers
What is the name of a variable that does not change values?
denpristay [2]

Answer:

Constant variable

Explanation:

Constant variable is a data item whose value cannot change

5 0
2 years ago
Read 2 more answers
One of your suppliers has recently been in the news. Workers complain of long hours, hot and stuffy workrooms, poor lighting, an
Alex73 [517]

Answer: sweatshop

Explanation

7 0
3 years ago
Other questions:
  • Write a program that defines a type for a structure that stores information on a student in ENG EK 125. Declare two variables to
    8·1 answer
  • What device copies system files
    14·1 answer
  • Why is it important to match the latencies fo the older modules to the newer modules?
    14·1 answer
  • The internet has opened a wide range of new opportunities for small businesses. true or false?
    13·1 answer
  • Jesse earned $420 a week, and he worked 5 days a week. what is his daily wage?
    10·2 answers
  • A programmer writing code in class Point attempts to override the following inherited method:public boolean equals( Object o ) {
    12·1 answer
  • For anyone who plays warzone, do you think the hdr has earned its spot back after the spr nerf? Be completely honest plz.​
    8·1 answer
  • Which of the following are the benefits of using Responsive Display Ads?
    9·1 answer
  • Write a program that prompts the user to enter an oligonucleotide sequence, such as TATGAGCCCGTA.
    7·1 answer
  • What is another word for: a location in memory that contains a value?
    7·2 answers
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!