you forgot to import math module >>> import math >>> math.sqrt(9) 3.0
if you want math functions to your current namespace use: >>> from math import * -- Tõnis On Jan 4, 10:13 am, "siggi" <[EMAIL PROTECTED]> wrote: > Hi all, > > this is a newbie question on : > Python 2.5 (r25:51908, Sep 19 2006, 09:52:17) [MSC v.1310 32 bit (Intel)] on > win32 > PC with WinXP > > Inhttp://www.python.org/doc/2.3.5/lib/module-math.html > I read: > > "sqrt( x) Return the square root of x." > > Now the test for module math with function pow(): > --------------------------------------------------->>> pow(9,9)387420489 > > Fine, but sqrt() fails: > ------------------->>> sqrt(9)I get this error message > > 'Traceback (most recent call last): > File "<pyshell#3>", line 1, in <module> > sqrt(9) > NameError: name 'sqrt' is not defined' > > Same for sin() and cos(). ">>> Import math" does not help. Will I have to > define the sqrt() function first? If so, how? > > Please help! > > Thank you, > > Siggi -- http://mail.python.org/mailman/listinfo/python-list