Get startedGet started for free

How much more do organic avocados cost?

Avocados are increasingly popular food, and no city in the United States consumes as many avocados as Los Angeles, California. At the same time, high demand for organic produce means that organic avocados cost more than their conventionally grown counterparts. In this exercise, you'll explore some historical data on the price of avocados in Los Angeles to gain some insight into the premium that people pay for organic avocados.

Two arrays, conventional and organic, are loaded that contain the month-by-month average price in USD of conventional and organic avocados in Los Angeles.

You'll use NumPy's mean(), min(), and max() functions to summarize these arrays and gain some insight into the premium cost of organic avocados in Los Angeles.

This exercise is part of the course

Python for MATLAB Users

View Course

Hands-on interactive exercise

Have a go at this exercise by completing this sample code.

# Calculate and print the average price conventional avocados
conventional_mean = ____.____(____)
print('Mean conventional price: ${:.2f}'.format(conventional_mean))
Edit and Run Code