Sales Report Pipeline
Challenge on lesson: Checkpoint: Data Processing Pipeline
CHALLENGE
Difficulty: intermediate+25 XP
Implement report(sales) where sales is a list of dicts with keys 'region' (str) and 'amount' (int, may be negative for refunds). Return a dict mapping region to total amount, but ONLY include regions with a positive total. Also implement is_valid(sale) returning True only for dicts with str region and int amount (no bools).
Press Submit to check your solution.
Back to lesson: Checkpoint: Data Processing Pipeline