About 173,000 results
Open links in new tab
  1. How do I calculate square root in Python? - Stack Overflow

    Jan 20, 2022 · I need to calculate the square root of some numbers, for example √9 = 3 and √2 = 1.4142. How can I do it in Python? The inputs will probably be all positive integers, and …

  2. Is there a short-hand for nth root of x in Python? - Stack Overflow

    In Python this operation seems to be represented by the ** syntax. >>> 3**2 9 If I want to go the other direction and calculate the 2nd root of 9 then in maths I need to use a symbol: 2√9 = 3 Is …

  3. How to perform square root without using math module?

    Jun 15, 2010 · I want to find the square root of a number without using the math module,as i need to call the function some 20k times and dont want to slow down the execution by linking to the …

  4. math - Integer square root in python - Stack Overflow

    Mar 13, 2013 · Is there an integer square root somewhere in python, or in standard libraries? I want it to be exact (i.e. return an integer), and raise an exception if the input isn't a perfect …

  5. python - Check if a number is a perfect square - Stack Overflow

    Mar 22, 2010 · How could I check if a number is a perfect square? Speed is of no concern, for now, just working. See also: Integer square root in python.

  6. Loop Function to find a Square root of a number - Stack Overflow

    Sep 17, 2018 · The question is To find the square root of number ‘N’.using this procedure, we must implement the following process: Guess a value for the square root of N Divide N by that …

  7. Square root of complex numbers in python - Stack Overflow

    I have run across some confusing behaviour with square roots of complex numbers in python. Running this code: from cmath import sqrt a = 0.2 b = 0.2 + 0j print (sqrt (a / (a - 1))) print (sqrt …

  8. Square root of a number without math.sqrt - Stack Overflow

    Jul 17, 2017 · Python is not an equation solver, like Wolfram Alpha. It is a language that executes the instructions you give it. root = number**(1/2) is an instruction. It says: take number, which …

  9. square root without pre-defined function in python

    Sep 13, 2017 · How can one find the square root of a number without using any pre-defined functions in python? I need the main logic of how a square root of a program works. In general …

  10. Python- Square Root of list - Stack Overflow

    Mar 23, 2022 · Taking the square root of each number in a list. For this problem in the sqrt_list function: Take the square root of each item in the list, Store each squared item in another list, …

Refresh