pathpy.factorial

pathpy.factorial(n: int) int[source]

Computes the factorial through a recursive algorithm.

Parameters
n: int

A positive input value.

Returns
int

Returns the computed factorial.

Raises
InvalidFactorialError

If n is less than 0.

Examples

>>> pathpy.factorial(1)
1