Why Set Operations Matter
📖 Scenario: Imagine you work in a store that sells fruits. You have two lists: one for fruits currently in stock and one for fruits customers want to buy. You want to find out which fruits are both in stock and wanted by customers, which fruits are only in stock, and which fruits are only wanted by customers.
🎯 Goal: You will use numpy set operations to find common fruits, fruits only in stock, and fruits only wanted by customers.
📋 What You'll Learn
Create two numpy arrays with exact fruit names
Create a variable to hold the common fruits
Use numpy set operations to find fruits only in stock and only wanted
Print the results clearly
💡 Why This Matters
🌍 Real World
Stores and businesses often need to compare lists of items, like stock vs customer demand, to make smart decisions.
💼 Career
Data analysts and scientists use set operations to clean data, find overlaps, and identify unique entries in datasets.
Progress0 / 4 steps