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 stringsFind the bug: forgetfulness returnfix46 / 174
+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`
✏️ 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…