python recursao code example
Example: recursion in python
def rec(num):
if num <= 1:
return 1
else:
return num + rec(num - 1)
print(rec(50))
def rec(num):
if num <= 1:
return 1
else:
return num + rec(num - 1)
print(rec(50))