Nov-24-2016, 03:53 PM
(This post was last modified: Nov-24-2016, 03:53 PM by mbestivert.)
I learned that there are two ways to compute the square root of a number. One is by using ** operator and the other by importing math module. Now, just out of curiosity I tried to do it in this way
I am using Python 2.6.6 (for Windows) for Python course.
>>> 81**(1/2) 1 >>> 64**(1/2) 1So I know 1/2 = 0.5 plus any number to the power 0.5 is equivalent to the square root of that number. So why does the output always yield the value 1?
I am using Python 2.6.6 (for Windows) for Python course.