About 11,500,000 results
Open links in new tab
  1. Is there a short-hand for nth root of x in Python? - Stack Overflow

    Any nth root is an exponentiation by 1/n, so to get the square root of 9, you use 9**(1/2) (or 9**0.5) to get the cube root, you use 9 ** (1/3) (which we can't write with a simpler fraction), and to get the nth root, 9 ** (1/n).

  2. How do I calculate square root in Python? - Stack Overflow

    Jan 20, 2022 · The math module from the standard library has a sqrt function to calculate the square root of a number. It takes any type that can be converted to float (which includes int) and returns a float. The power operator (**) or the built-in pow() function can also be …

  3. The Python Square Root Function

    The Python square root function, sqrt(), is part of the math module and is used to calculate the square root of a given number. To use it, you import the math module and call math.sqrt() with a non-negative number as an argument.

  4. Python math.sqrt () Method - W3Schools

    The math.sqrt() method returns the square root of a number. Note: The number must be greater than or equal to 0. Required. A number to find the square root of. If the number is less than 0, …

  5. 4 Methods to Calculate Square Root in Python - AskPython

    Jul 6, 2021 · In this tutorial, we have learned the different ways to calculate the square root of numbers in Python. We have also learned how to use Python functions like math.sqrt(), math.pow(), and numpy.sqrt().

  6. Find nth Root of a Number Using Numpy - Python Pool

    Aug 31, 2021 · In this article, we will learn about the numpy nth root of a number. We are going to learn how to solve the nth root of any number. In python, we use numpy.sqrt () to find the square root of a number. And we use numpy.cbrt () to find the third root, the cube of a number. But If we want the 5th root or 6th root of a number. What will we do?

  7. Python Square Roots: 5 Ways to Take Square Roots in Python

    Dec 1, 2022 · Learn 5 approaches to square roots in Python + some bonus advanced tricks. After learning about 4 ways to square a number in Python, now it's time to tackle the opposite operation – Python square roots.

  8. Python math.sqrt () function | Find Square Root in Python

    Feb 14, 2025 · math.sqrt () returns the square root of a number. It is an inbuilt function in the Python programming language, provided by the math module. In this article, we will learn about how to find the square root using this function. Example: We need to import math before using this function. Parameter: x: A number greater than or equal to 0. Returns:

  9. Square Root in Python

    Oct 2, 2024 · Learn how to calculate the square root in Python using the math.sqrt () function. This guide covers syntax, examples, and practical scenarios for efficient square root calculations.

  10. Python Find Square Root of Number – PYnative

    Mar 27, 2025 · Learn different ways to calculate the square root in Python, including using the math module and the exponentiation operator. Get clear code programs.

  11. Some results have been removed