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...
y por qué no hacerlo a lo animal? cubos_perfectos = dict((x*x*x, x) for x in range(MAX)) if x in cubos_perfectos: print "cubo perfecto" :) > > > > > _______________________________________________ > 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/