Skip to content

Instantly share code, notes, and snippets.

@ThiagosLima
ThiagosLima / factorial.py
Created August 14, 2020 15:51
Study of the implementation of factorial
"""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)