[Tutor] hypotenuse

Alan Gauld alan.gauld at btinternet.com
Fri Mar 14 09:40:44 CET 2008


>> Why can you not use something like:
>>
>> >>>hypotenuse = hyp_squared**1/2

And for completeness that could also be written:

hypotenuse = pow(hyp_squared,1/2)

Again, without the need to import math.

-- 
Alan Gauld
Author of the Learn to Program web site
Temorarily at:
http://uk.geocities.com/alan.gauld@btinternet.com/
Normally:
http://www.freenetpages.co.uk/hp/alan.gauld



More information about the Tutor mailing list