Recursive Functions : recursive function « Function « Python Tutorial






def fact( value ):
    if value <= 1 :
        return 1
    else :
        return value * fact( value-1 )

fact(4)
fact(6)
fact(10)
fact(12)
fact(1)








10.13.recursive function
10.13.1.Recursion
10.13.2.Recursive factorial function.
10.13.3.Recursive fibonacci function.
10.13.4.Recursive Functions