py04_03: the function of the recursive function

The definition of recursive functions: inside the function, the function itself calls his own return values, called recursive function

  Requirements: 1. There must be a definite end conditions:

     2. Each relative reduction, can not increase, otherwise it will never end, an error

     3. recursive efficiency is not high, too much will cause the level of recursion stack overflow (in the computer, the function call is achieved through the stack (Stack) This data structure, each time a function call into the stack the stack frame is increased by one whenever the function returns, the stack will cut a layer stack frame. Since the size of the stack is not infinite, so the number of recursive calls too much will result in a stack overflow) 

Guess you like

Origin www.cnblogs.com/yeyu1314/p/12424100.html