New! Explore our Programming Academy and AI Tutor - learn to code from scratch, free to start. Explore Now
← Back to Community
Question

Recursion still feels like magic. How did it click for you?

T
Tunde Okafor · Oct 29, 2026 11:21 PM
I understand the example in the Python lesson when I read it line by line, but if I look away and try to write a recursive function myself, I freeze. I can write loops fine. The moment a function calls itself my brain stops tracking where the values are.
👁 71 views 💬 1 replies 👥 Courselord Community

1 Answer

✓ Accepted Answer
T
Tunde Okafor · Oct 30, 2026 2:21 AM
Try adding print statements inside the function and run it with a very small input, like countdown(3). Watch the order of the output. You will see each call pause, wait for the smaller call, then finish on the way back up. Then write the same function as a loop. Seeing both versions side by side is what made it stop feeling like magic for me.
Log in to post a reply.