Re: [Tutor] why?

2008-05-29 Thread Robert William Hanks
happenig wen python round the the cubed root. is this code wrong? On 5/29/08, Kent Johnson <[EMAIL PROTECTED]> wrote: > On Wed, May 28, 2008 at 8:43 PM, Robert William Hanks > <[EMAIL PROTECTED]> wrote: > > > > Need ti find out whem a number o this form i**3+j**3+1 is ac

[Tutor] why?

2008-05-28 Thread Robert William Hanks
Need ti find out whem a number o this form i**3+j**3+1 is acube. tryed a simple brute force code but, why this not work? def iscube(n): cubed_root = n**(1/3.0) if round(cubed_root)**3 == n: return True else: return False for i in range(1,1000): for j in range

[Tutor] gotoxy

2007-08-01 Thread Robert William Hanks
hi folks, is there in python a gotoxy like in pascal so i can print stuff in other parts of the screen? what about some thing like it for the gui in windows? ___ Tutor maillist - Tutor@python.org http://mail.python.org/mailman/listinfo/tutor

[Tutor] iscube function

2007-04-10 Thread Robert William Hanks
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/