monty.math module

Addition math functions.

nCr(n, r)[source]

Calculates nCr.

Parameters
  • n (int) – total number of items.

  • r (int) – items to choose

Returns

nCr.

nPr(n, r)[source]

Calculates nPr.

Parameters
  • n (int) – total number of items.

  • r (int) – items to permute

Returns

nPr.