Skip to main content
← CoursesPython FoundationsModule 3 · Functions and stringsSuma listwrite34 / 170
💬 Discuss🧪 Playground+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`

Keep going

✏️ Write your code here
🐍
Loading Python...
First visit only — ~5-10s. Stays cached afterward.
📊 Result
Press Run to see result...
📣 Help someone learn PythonShare this lesson with a friend — the first 15 are free, no signup.Tweet

💬 Discussion

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