This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
"""Study of the implementation of factorial""" | |
import pytest | |
from functools import reduce | |
def recursive_factorial(n): | |
"""Given a number n, return the factorial of n""" | |
if n == 0: | |
return 1 | |
return n * recursive_factorial(n - 1) |