About 846,000 results
Open links in new tab
  1. Python Program to Find the Square Root

    In this program, you'll learn to find the square root of a number using exponent operator and cmath module.

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

    Jul 6, 2021 · Let’s discuss some well-known methods in Python to calculate the square root of numbers. 1. Calculate square root using the exponent operator. In this method, we will define our own function to find the square root of a number. And to calculate the square root of a number we will be using the exponent operator (**) in Python.

  3. 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.

  4. Find Square Root Of Given Number – Python | GeeksforGeeks

    Feb 24, 2025 · Given an integer X, find its square root. If X is not a perfect square, then return floor(√x). For example, if X = 11, the output should be 3, as it is the largest integer less than or equal to the square root of 11.

  5. The Python Square Root Function

    Python’s sqrt() function calculates square roots using Python’s math.sqrt() for quick and accurate results in your programs. math.sqrt() calculates the square root of positive numbers and zero but raises an error for negative inputs.

  6. Square Root in Python - Python Guides

    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.

  7. Python Square Root: How to Calculate a Square Root in Python

    Sep 4, 2021 · In this tutorial, you’ll learn how to calculate use Python to calculate the square root of a number, using the .sqrt() function. You’ll learn how to do this with, and without, the popular math library that comes built into Python.

  8. Python Find Square Root of Number - PYnative

    Mar 27, 2025 · Output. square root of 0: 0.0 square root of integer number 4: 8.0 square root of float number 5.6: 2.3664319132398464 3: Using cmath.sqrt() Function for complex numbers. To calculate the square root of a number in Python the cmath module can be used when dealing with both real and complex numbers.It is useful for finding square roots of negative numbers.

  9. How to calculate square root in Python (with examples)

    Mar 18, 2024 · One of the simplest ways to calculate the square root of a number in Python is by using the exponentiation operator (**). This operator allows you to raise a number to a specific power. The square root of a number is equivalent to raising that number to the power of 0.5. Here’s how you can use this method:

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

    Jan 20, 2022 · 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 used to calculate a square root. Mathematically speaking, the square root of a equals a to the power of 1/2.

  11. Some results have been removed
Refresh