On Tue, 10 Apr 2007, Robert William Hanks wrote:
> how is the best way to find out if a number is a perfect cube in python?
> i am working if integer numbers only. i am asking because
> pow(1728, 1.0/3.0) --> 11.998
def iscube(n):
cubed_root = n**(1/3.0)
if round(cubed_roo
how is the best way to find out if a number is a perfect cube in python?
i am working if integer numbers only. i am asking because
pow(1728, 1.0/3.0) --> 11.998
___
Tutor maillist - Tutor@python.org
http://mail.python.org/mailman/listinfo/