Python Math Snippets

The Python snippet collection contains helper functions for Python 3.6. It includes utilities for most common data types, such as primitivies, lists, dictionaries and date objects.

  • Factorial

    Python, Math

    Calculates the factorial of a number.

  • Calculates the number of ways to choose k items from n items without repetition and without order.

  • Degrees to radians

    Python, Math

    Converts an angle from degrees to radians.

  • Radians to degrees

    Python, Math

    Converts an angle from radians to degrees.

  • Number to binary

    Python, Math

    Returns the binary representation of the given number.

  • Number to hex

    Python, Math

    Returns the hexadecimal representation of the given number.