Simple recursive counting function
(depth)
| 46 | |
| 47 | # ---------------------- Recursion Performance ---------------------- |
| 48 | def recursive(depth): |
| 49 | """Simple recursive counting function""" |
| 50 | if depth <= 0: |
| 51 | return 0 |
| 52 | else: |
| 53 | return 1 + recursive(depth - 1) |
| 54 | |
| 55 | |
| 56 | def test_recursion(num_tests, depth): |
no outgoing calls