Skip to content

Commit 76b47ca

Browse files
committed
Fix doctest in factorial_recursive to test correct function
1 parent a71618f commit 76b47ca

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

maths/factorial.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -41,7 +41,7 @@ def factorial_recursive(n: int) -> int:
4141
https://en.wikipedia.org/wiki/Factorial
4242
4343
>>> import math
44-
>>> all(factorial(i) == math.factorial(i) for i in range(20))
44+
>>> all(factorial_recursive(i) == math.factorial(i) for i in range(20))
4545
True
4646
>>> factorial(0.1)
4747
Traceback (most recent call last):

0 commit comments

Comments
 (0)