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
hodyreva [135]
3 years ago
15

This lesson introduced the notion of "efficiency" in programming, and that it might mean different things at different times. Th

ink of an example outside of computer science in which you have heard the term "efficiency" and compare it to the ways we talked about efficiency in programming.In what ways is the meaning of "efficiency" the same? In what ways is it different?
Computers and Technology
1 answer:
Jlenok [28]3 years ago
6 0

Answer: While both measure resources, one is focused on algorithms to measure resources.

The <u>meaning changes</u> when the <u>subject changes</u> .The difference is that one refers to the algorithms and another can refer to resources used (if we talk about administration as in the example).

Explanation:

<em>An example outside of computer science in which you have heard the term efficiency :</em>

Efficiency is the <u>ability to have something to achieve proper fulfillment of a function</u>. For example, <u>in administration,</u> efficiency can be defined as the relationship between the achievements made with a project and the resources used in it.

<em>The way we talked about efficiency in programming :</em>

The term efficiency is used to describe <u>those properties of algorithms </u>that are related to the <u>amount of resources </u>used by it. An algorithm must be analyzed to determine the use of the resources it performs.

You might be interested in
Write a program that first gets a list of integers from input. The input begins with an integer indicating the number of integer
Gre4nikov [31]

Answer:

The program in Python is as follows:

num = int(input())

numList = []

for i in range(num+1):

   numInput = int(input())

   numList.append(numInput)

for i in range(len(numList)-1):

   if numList[i] <= numList[-1]:

       print(numList[i],end=" ")

Explanation:

This gets input for the number of integers

num = int(input())

This initializes an empty list

numList = []

This iterates through the number of integers and gets input for each

for i in range(num+1):

   numInput = int(input())

The inputs including the threshold are appended to the list

   numList.append(numInput)

This iterates through the list

for i in range(len(numList)-1):

All inputs less than or equal to the threshold are printed

   if numList[i] <= numList[-1]:

       print(numList[i],end=" ")

7 0
3 years ago
Give an example of an if/else statment and a case statment that are equivalent. Your example should contain at least three choic
zimovet [89]

Answer:

The if - else and equivalent switch case statements in c++ language are given below.

if ( ch == 1 )

       cout << " sum is " << x + y << endl;

   else if ( ch == 2 )

       cout << " difference is " << x - y << endl;

   else if ( ch == 3 )

   {

       cout << " Quitting " << endl;

       exit;

   }

switch( ch )

   {

       case 1 :    cout << " Sum is " << x + y << endl;

                   break;

       case 2 :    cout << " Difference is " << x - y << endl;

                   break;

       case 3 :    cout << " Quitting " << endl;

                   break;

   }      

Explanation:

The above statements use three variables which are declared and initialized as shown.

int x = 10;

    int y = 25;

    int ch;

The above statements execute for of addition, subtraction or to quit the program.

cout << " 1. Addition " << endl;

    cout << " 2. Subtraction. " << endl;

    cout << " 3. Quit " << endl;

    cout << " Enter your choice " << endl;

The variable ch holds the numerical option entered by the user.

    cin >> ch;

For if - else statements, the if statement is executed based on the value of variable ch entered by the user. After execution, the compiler goes out of the statements automatically.

Following the if – else, if any statement is present, it will be executed.

For switch case, every case ends with break keyword. After the required case is executed based on the value of variable ch entered by the user, the break statement is executed which causes the switch case to terminate the control goes out of the statements.

Following the switch case, if any statement is present, it will be executed.

4 0
3 years ago
When you use the Query Editor to run a query that returns an xml type, theManagement Studio displays the XML data in blue with u
Ad libitum [116K]
Answer is c hope this helps
6 0
3 years ago
Which of these methods returns a random number?
Olenka [21]
D randgenerator
i just need 20 characters

6 0
3 years ago
Toby wants to gain experience in child development. Toby chooses to enter a month-long certificate program after high school and
Stolb23 [73]

the answer is short term goal

4 0
3 years ago
Other questions:
  • Can you give me a long list of old kid's cartoons
    8·1 answer
  • What does "CYBER-COCKROACH" mean??
    15·1 answer
  • What function does a security certificate perform
    15·2 answers
  • Which of the following is NOT a recommended characteristic for incident objectives?A. Stated in broad terms to allow for flexibi
    6·1 answer
  • For a class project, Jerome builds a simple circuit with a battery and three light bulbs. On his way to school, Jerome drops his
    9·1 answer
  • Write a function that, given an array A of N integers, of which represents loads caused by successive processes, the function sh
    15·1 answer
  • (e) Give the output of the following:
    15·2 answers
  • Helen is working on her colleague’s photos. She came across this particular photo and was confused about which effect the photog
    15·2 answers
  • Write a program that reads an integer, a list of words, and a character. The integer signifies how many words are in the list. T
    6·1 answer
  • To download your presentation as pictures, choose this option.
    9·2 answers
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!