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 →
← CoursesPython FoundationsModule 3 · Functions and stringsSuma listwrite36 / 174
+75 XP
Task
📝 **Task:** `total(numbers)` returns the sum of a list via `sum()`. 📋 **Steps:** 1. `def total(numbers):` 2. `return sum(numbers)` 3. Call `total([10, 20, 30])` 💡 **Similar example:** ```python def add_all(values): return sum(values) print(add_all([1, 2, 3, 4])) # 10 ``` 🎯 **Expected output:** `60`
✏️ 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…