Skip to main content
🔒 Preview mode. The first 15 Foundations lessons are free; this one is Pro. Start a 7-day trial to unlock the editor, AI hints and the rest of the curriculum. Card required, cancel any time in Dashboard.Start 7-day trial →
← CoursesAI Engineering with PythonModule 6 · Frontier AI EngineeringMulti-agent orchestration patternswrite101 / 105
+130 XP
Task
📝 **Task:** Implement `merge_themes(worker_outputs: list[list[str]]) -> list[tuple[str, int]]`: * Flatten all worker lists. * Normalise: `strip()` then `lower()`. Drop empty strings. * Count occurrences. * Return list sorted by count descending, ties broken alphabetically. Expected output for the demo workload: ``` [('shipping', 3), ('billing', 2), ('refund', 1)] ``` 📋 Implement the function above. Tests run automatically. 💡 **Hint:** Re-read the theory if stuck.
✏️ Write your code here
🐍
Loading Python...
One-time download (~1 MB). Then it runs instantly.
📊 Result
Press Run to see result...

💬 Discussion

Be the first to ask a question or share a tip.
Sign in to join the discussion. Reading is free.
Loading discussion…