what is mean if and recursion if code example
Example 1: recursion
# modified code tranclated to python from (Drab Duck)
def fact(num):
if num <= 1:
return 1
else:
return num*fact(num-1)
Example 2: recursion
def foo():
foo()
# modified code tranclated to python from (Drab Duck)
def fact(num):
if num <= 1:
return 1
else:
return num*fact(num-1)
def foo():
foo()