Timeline for Need help understanding a recursion example in Python
Current License: CC BY-SA 3.0
7 events
| when toggle format | what | by | license | comment | |
|---|---|---|---|---|---|
| Jul 26, 2014 at 9:15 | answer | added | ctrl-alt-delor | timeline score: 1 | |
| Jul 26, 2014 at 9:15 | comment | added | Jan Doggen | Just put 3 in and follow the code all the way through the end. Then 4. Then you'll understand. You could do this on paper. | |
| Jul 26, 2014 at 9:00 | comment | added | ctrl-alt-delor |
I thing it is clearer if you rewrite the else part by removing the two temporary variable to be just return factorial(n-1) * n.
|
|
| Jul 26, 2014 at 7:31 | answer | added | Kilian Foth | timeline score: 3 | |
| Jul 26, 2014 at 7:14 | history | edited | thorsten müller | CC BY-SA 3.0 |
formatted code
|
| Jul 26, 2014 at 7:08 | review | First posts | |||
| Jul 26, 2014 at 9:15 | |||||
| Jul 26, 2014 at 7:08 | history | asked | Ali Mustafa | CC BY-SA 3.0 |