You are viewing a single comment's thread. Return to all comments →
In Python 3.
We know that factorial of 1 and 0 is 1, after that we have what we have
def factorial(n): if n <= 1: return 1 else: result = n * factorial(n - 1) return result
Seems like cookies are disabled on this browser, please enable them to open this website
Day 9: Recursion 3
You are viewing a single comment's thread. Return to all comments →
In Python 3.
We know that factorial of 1 and 0 is 1, after that we have what we have