Third week - the 17th chapter -Python3.5- recursive

A recursive definition

1. What is recursive: in a function call to the function itself

2. Maximum number of layers to do a recursive limit: 997, but you can own limitations

 

# PCJ 
# inside the function can call other functions, if a function calls itself within, this function is a recursive function

DEF Calc (n-):
Print (n-)
IF int (n-/ 2)> 0:
return Calc (int ( n-/ 2))
Calc (10)

Guess you like

Origin www.cnblogs.com/pcjbk/p/10990124.html