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
mr_godi [17]
3 years ago
6

Choose the best type of loop for each situation.

Computers and Technology
1 answer:
matrenka [14]3 years ago
7 0

Answer:

1. Option A: for loop is correct

2. Option B: while loop is correct

Explanation:

Two loops are used commonly. For and while

For is used when the number of iterations are already known and while is used when number of iterations is not known and the loop has to be terminated based on any condition.

<u>1. You are finding the batting average of 13 baseball players. </u>

For loop will be used as the number of iterations is already known. The score of 13 players has to be used to calculate the average so there will be 13 iterations. Hence, for loop will be used.

<u>2. You are asking your users for the names of all the stores where they shopped to find their friend's birthday  present. They will show they are done by entering the word "done."</u>

While loop will be used as the termination of loop depends on the input given by the user so the number of iterations are not already known.

Hence,

1. Option A: for loop is correct

2. Option B: while loop is correct

You might be interested in
Which of the following are points that can demonstrate the accuracy of a website?
Ivahew [28]

websites that can backup their answers so the first one:) im just thinking logically.

3 0
3 years ago
How do you measure the capacity of speed and memory of computer system<br>Explain.​
jeka94
Im sorry i just need points
3 0
3 years ago
Can a percent be used in a filename?
alina1380 [7]
Hey There!

A percent can be used in a filename.
4 0
3 years ago
Line formatting can be accomplished by using
schepotkina [342]

Answer:

How can line formatting be accomplished?

To format line spacing:

Select the text you want to format. Selecting text to format.

On the Home tab, click the Line and Paragraph Spacing command. A drop-down menu will appear.

Move the mouse over the various options. A live preview of the line spacing will appear in the document. Select the line spacing you want to use.

The line spacing will change in the document.

3 0
2 years ago
Please tell fast plzzzzzz.​
lana [24]

Answer:

True

Explanation:

4 0
3 years ago
Other questions:
  • What is tuple and attribute of a relation​
    11·1 answer
  • Which of the following tends to be true of silent film acting as opposed to sound film acting?
    7·1 answer
  • How many people employed in the United States work in a job related to digital media?
    12·1 answer
  • Why might a variable used for output have to be of a different type then a variable used for input? ​
    12·1 answer
  • opy the code below into the coderunner window. Debug the code so that it outputs the verses correctly. a = input("Enter an anima
    14·1 answer
  • Baking Cookies. Sweet Dough Inc. bakes cookies—a popular dessert—based on the quantities ordered by their customers. Three raw m
    12·1 answer
  • 1. asynchronous_communication
    5·1 answer
  • Which of the following is an accurate definition of a computer system? A computer system consists of the operating system that t
    6·1 answer
  • To display data in a certain manner, like alphabetical order, is called
    5·2 answers
  • How to make a project using PID and thermacouple
    11·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!