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
a limited-access expressway. A)allows vehicles to enter or exit only at certain place.B) does not permit trucks or buses.C)has n
zepelin [54]
Hello babe I just wanted to say hello
3 0
2 years ago
What is output?
postnew [5]

Answer:The French and Dutch settlements differed from the Spanish colonies in that they were created mainly to trade and develop industries, while the Spanish were primarily concerned with gold and silver excavation, and then later with sugar exportation.

Explanation:The French and Dutch settlements differed from the Spanish colonies in that they were created mainly to trade and develop industries, while the Spanish were primarily concerned with gold and silver excavation, and then later with sugar exportation.

8 0
3 years ago
Jemima has finished formatting her main headings. She now wants to format her two subheadings. She wants to apply the format of
klasskru [66]

Answer:

the Format Painter feature

6 0
3 years ago
PLEASE HELPPPPPPPPPPPPPPPPPPPPPPPP LASTTTTT QUESTION FINALLLY :)))))
aleksandrvk [35]
Last of the three.
Basic membership is free (I think).
6 0
3 years ago
Which of the following can a cell contain?
vredina [299]
I think it could be All of these.....
5 0
3 years ago
Read 2 more answers
Other questions:
  • You are preparing to program a replacement system board, but the "system is booting in mpm mode" message is not displayed. what
    10·2 answers
  • true or false? to change document properties, first tap or click file on the ribbon to open the properties view.
    6·2 answers
  • Why is Abraham called the Father of Believers?
    6·1 answer
  • 18. Using the same formatting elements and designs across slides in a presentation is important to develop?
    5·1 answer
  • What operating system is an open source program
    15·1 answer
  • Consider a swapping system in which memory consists of the following hole sizes in memory order: 10 MB, 4 MB, 20 MB, 18 MB, 7 MB
    9·1 answer
  • [1] Our son has started playing organized T-ball, a beginner’s version of baseball. [2] “Organized” is what parents call it, any
    9·2 answers
  • How do I charge my ACDC Halo bolt?
    11·1 answer
  • What is ransomware<br>я​
    5·1 answer
  • What adaptation Judy and her parents have that help them run from predators coming?​
    6·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!