Skip to main content
← CoursesPython FoundationsModule 3 · Functions and stringsFind the bug: forgetfulness returnfix44 / 170
💬 Discuss🧪 Playground+75 XP
Task
📝 **Task:** Function `add(a, b)` should return the sum but returns `None`. Add `return`. 📋 **Steps:** - Find the `a + b` line missing `return` - Add `return` before the expression 💡 **Similar example:** ```python def multiply(x, y): return x * y print(multiply(4, 5)) # 20 ``` ⚠️ A function without `return` ALWAYS returns `None`. 🎯 **Expected output:** `7`

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…