[Tutor] square root
alan.gauld at btinternet.com
Mon May 28 10:41:38 CEST 2007
"adam urbas" <adamurbas at hotmail.com> wrote
> Hi all,I was just wondering how I would go about
> performing a square root thing, for my radiacir.py program.
There is a sqrt function in the math module.
Math has a lot of other common mathematical functions
in it too - logs, trigonometry etc
Or you can use the builtin pow() function to raise the value
to the power 0.5
or use exponentiation:
print 9 ** 0.5
Author of the Learn to Program web site
More information about the Tutor