You need to say math.sqrt
when you use it. Or, do from math import sqrt
.
Hmm, I just read your question more thoroughly.... How are you importing math
? I just tried import math
and then math.sqrt
which worked perfectly. Are you doing something like import math as m
? If so, then you have to prefix the function with m
(or whatever name you used after as
).
pow
is working because there are two versions: an always available version in __builtin__
, and another version in math
.