Square root in python?
how do i get the square root of a number in python?
|
The function is sqrt from module math
Code:
>>> from math import sqrt |
4 ** 0.5
(or was it 4 * 0.5? Just kidding...!) |
what is the adv/dadv of those different methods?
|
** is an internal operator. sqrt is a function that you need to import from math module. can you guess which is "faster"?
|
All times are GMT -5. The time now is 08:50 AM. |