Sovi.AI - AI Math Tutor

Scan to solve math questions

QUESTION IMAGE

dropdown choose the best collection for each situation. list i of the a…

Question

dropdown
choose the best collection for each situation.
list
i of the ages of the last 50 customers visit a restaurant. as new customers
een in the list the longest.
deque
tuple
you write a loop to save anywhere from 10 to 100 values from a user. you will pass the collection to a function to find the average.

Explanation:

Brief Explanations

Lists are mutable sequences in Python. They are suitable for saving a variable - number of values (from 10 to 100 in this case) and can be easily passed to a function for further processing like calculating the average. Deques are more useful for double - ended operations, and tuples are immutable which is not ideal when new values might be added during the loop.

Answer:

list