Sales Data Analysis Pattern
📖 Scenario: You work in a small shop that sells three products. Every day, you record how many units of each product you sell. Now, you want to analyze this sales data to find out which products sold more than a certain number of units.
🎯 Goal: Build a simple program that stores daily sales data in a dictionary, sets a sales threshold, finds products that sold more than the threshold, and prints those products with their sales.
📋 What You'll Learn
Create a dictionary called
sales with exact product names and sales numbersCreate a variable called
threshold to set the minimum sales numberUse a dictionary comprehension to find products with sales greater than
thresholdPrint the resulting dictionary of filtered products and their sales
💡 Why This Matters
🌍 Real World
Analyzing sales data helps businesses understand which products are popular and make better stock decisions.
💼 Career
Data analysts often filter and summarize sales data to create reports and support business decisions.
Progress0 / 4 steps