Sovi.AI - AI Math Tutor

Scan to solve math questions

QUESTION IMAGE

question # 7 dropdown choose the best type of loop for each situation. …

Question

question # 7
dropdown
choose the best type of loop for each situation.
you are finding the batting average of 13 baseball players.
you are asking your users for the names of all the stores where they shopped to find their birthday present. they will show they are done by entering the word \done.\

Explanation:

Brief Explanations

For finding the batting average of 13 baseball players, a for loop is suitable as you know the exact number of iterations (13 players). For asking users for store names until they enter "done", a while loop is appropriate since the number of iterations is not known in advance and depends on user input.

Answer:

For finding the batting average of 13 baseball players: for loop
For asking users for store names until they enter "done": while loop