Reference#

Modules#

Math#

General Functions.

huber.math.factorial(n)[source]#

Get facorial of n (recursive version).

N

Integer to calculate factorial for

Returns

Factorial of n

Parameters

n (int) –

Return type

int

>>> factorial(4)
24
huber.math.gcd(a, b)[source]#

Get greatest common divisor.

A

First int

B

Second int

Returns

Greatest common divisor as int

Parameters
  • a (int) –

  • b (int) –

Return type

int

huber.math.sum_r(a_list)[source]#

Get sum of a list of integers.

L

List of integers

Returns

Sum of items of l

Parameters

a_list (List[int]) –

Return type

int