[Tutor] square root

D-Man dsh8290@rit.edu
Thu, 1 Feb 2001 16:03:48 -0500


There is no square root /operator/ in python.  (AFAIK)  There is a
square root function instead.

from math import sqrt
print sqrt( 49 )


You can use it just like any other function.  I will return the square
root (as a floating point number).

HTH,
-D

On Wed, Jan 31, 2001 at 10:12:48PM +0100, W.W. van den Broek wrote:
| How do you use the
| square root as operator
| in python?
| Dumb question, but
| thanks anyway,
| walter
| -- 
| W.W. van den Broek
| e-mail:	
| vandenbroek@psyd.azr.nl
| AZR-Dijkzigt		fax:	
| 010-4633217
| afdeling psychiatrie
| tel:		010-4639222
| Postbus 2040		e-mail	
| vdbroekw@wxs.nl (thuis)
| 3000 CA Rotterdam
| homepage:
| http://home.planet.nl/~vdbroekw
| 
| _______________________________________________
| Tutor maillist  -  Tutor@python.org
| http://mail.python.org/mailman/listinfo/tutor