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

Function permutation

factorial_perm_comp.py:21–22  ·  view source on GitHub ↗
(n, r)

Source from the content-addressed store, hash-verified

19
20
21def permutation(n, r):
22 return factorial(n) / factorial(n - r)
23
24
25def combination(n, r):

Callers 2

combinationFunction · 0.85
mainFunction · 0.85

Calls 1

factorialFunction · 0.70

Tested by

no test coverage detected