asked 98.1k views
5 votes
Write a statement that assigns the variable avg_price with the average of the elements of prices.

asked
User Rachele
by
8.6k points

1 Answer

5 votes

Answer:

avg_price = sum(prices) / len(prices)

Step-by-step explanation:

using the sum command to add all of the values of the prices dividing by the number of prices

answered
User FeRD
by
7.6k points

No related questions found