Advertisement
here2share

# recursive_limitation.py

Apr 18th, 2021
860
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Python 0.32 KB | None | 0 0
  1. # recursive_limitation.py
  2.  
  3. from time import time as tc
  4.  
  5. def recursive(limit, n=0):
  6.     if n >= limit:
  7.         return n
  8.  
  9.     return recursive(limit, n + 1)
  10.  
  11. t = recursive(500)
  12. print t
  13. c = tc()+3
  14. while tc() < c: 0
  15.  
  16. t = recursive(998)
  17. print t
  18. c = tc()+3
  19. while tc() < c: 0
  20.  
  21. t = recursive(999) # maximum
  22. print t
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement