← Back to All Projects
Customer Data Analyzer
Build a system to analyze customer purchase patterns and segment customers by behavior
ProgressSection 1 of 6
Section 1: Understanding Customer Data
📖
EXPLAIN: Understanding the Concept
👥 What We're Building
We're building a Customer Segmentation Tool that analyzes customer purchase data and automatically categorizes customers as:
- High Value: Customers who spend $1000 or more
- Medium Value: Customers who spend $500-$999
- Low Value: Customers who spend less than $500
Why this matters: Businesses treat different customer segments differently. High-value customers get premium support, special offers, etc.
What you'll learn: How to process multiple records, make decisions with code, and categorize data.
👀
SHOW: Here's How It Works
👀 Customer Data Structure
Customer data typically looks like this:
Customer: Alice, Total Purchases: $1,250 → HIGH VALUE Customer: Bob, Total Purchases: $450 → LOW VALUE Customer: Carol, Total Purchases: $750 → MEDIUM VALUE
We'll store this as a list of lists (nested data):
customers = [
["Alice", 1250],
["Bob", 450],
["Carol", 750]
]
✍️
PRACTICE: Now You Build It!
✍️ Your Turn: View Customer Data
Run the demo code to see how customer data is structured!
Notice how each customer is a list with two items: [name, purchase_amount]
Code Editor
Initializing editor...
💻 Output:
Click 'Run Code' to see output here...