MCPcopy Create free account
hub / github.com/geekcomputers/Python / factorial

Function factorial

factorial_perm_comp.py:12–18  ·  view source on GitHub ↗
(n)

Source from the content-addressed store, hash-verified

10
11
12def factorial(n):
13 fact = 1
14 while n >= 1:
15 fact = fact * n
16 n = n - 1
17
18 return fact
19
20
21def permutation(n, r):

Callers 3

permutationFunction · 0.70
combinationFunction · 0.70
mainFunction · 0.70

Calls

no outgoing calls

Tested by

no test coverage detected