Code Snippets

30 seconds of code provides a curated collection of short code snippets for all your development needs. Our collection spans many topics, ranging from simple coding problems to theoretical concepts and development techniques.

  • Nth root of number

    Calculates the nth root of a given number.

    JavaScript, Math · Jan 6, 2021

  • Radians to degrees

    Converts an angle from radians to degrees.

    JavaScript, Math · Sep 15, 2020

  • Value to safe integer

    Converts a value to a safe integer.

    JavaScript, Math · Oct 22, 2020

  • Binomial coefficient

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

    Python, Math · Nov 2, 2020

  • Degrees to radians

    Converts an angle from degrees to radians.

    Python, Math · Nov 2, 2020

  • Radians to degrees

    Converts an angle from radians to degrees.

    Python, Math · Nov 2, 2020

  • Number to binary

    Returns the binary representation of the given number.

    Python, Math · Oct 7, 2020

  • Number to hex

    Returns the hexadecimal representation of the given number.

    Python, Math · Oct 9, 2020