El lun, 15-03-2010 a las 15:38 +0100, marmolro escribió:
> perdón, se me fue la mano je je:
> 
> 
> math.pow(27,1./3).is_integer()
> 

Podría ser verdad, pero la precisión puede dar problemas aquí:

>>> math.pow(64,1./3)
>>> 3.9999999999999996

> 
> 
> 
> 
> 2010/3/15 marmolro <marmo...@gmail.com>
>         Buenas,
>         
>         
>         con la función inversa básicamente :) :
>         
>         
>         >>> math.log(27,3).is_integer()
>         True
>         
>         
>         2010/3/15 Pavel Daniel Lopez Castillo <pdlo...@uci.cu>
>                 Necesito una funcion que me permita conocer si un
>                 numero es un cubo perfecto ejemplo
>                 
>                 cubos perfectos: 1,8,27,64 etc...
>                 
>                 
>                 
>                 
>                 
>                 
>                 _______________________________________________
>                 Python-es mailing list
>                 Python-es@python.org
>                 http://mail.python.org/mailman/listinfo/python-es
>                 FAQ: http://python-es-faq.wikidot.com/
>                 
>         
>         
> 
> 
> _______________________________________________
> Python-es mailing list
> Python-es@python.org
> http://mail.python.org/mailman/listinfo/python-es
> FAQ: http://python-es-faq.wikidot.com/

Attachment: signature.asc
Description: Esto es una parte de mensaje firmado digitalmente

_______________________________________________
Python-es mailing list
Python-es@python.org
http://mail.python.org/mailman/listinfo/python-es
FAQ: http://python-es-faq.wikidot.com/

Responder a