Re: [Tutor] Finding a nearest perfect cube

2013-11-07 Thread Danny Yoo
> > > If i input a number, i should get a perfect cube nearest to it. > For eg: if > input=4, output=8 > input=8, output=27 > and so on > Let's consider those examples. Pretend you were given: input = 4 and the description of the problem. Forget computers for a brief moment. What woul

Re: [Tutor] Finding a nearest perfect cube

2013-11-07 Thread Alan Gauld
On 07/11/13 22:25, donsuni wrote: Hi, I am new to python and i have to write a following code without using any inbuilt function or a for loop. Only while and if loops are allowed. If i input a number, i should get a perfect cube nearest to it. For eg: if input=4, output=8 input=8, output=27 and

Re: [Tutor] Finding a nearest perfect cube

2013-11-07 Thread Marc Tompkins
On Thu, Nov 7, 2013 at 2:25 PM, donsuni wrote: > Hi, I am new to python and i have to write a following code without using > any > inbuilt function or a for loop. Only while and if loops are allowed. > > If i input a number, i should get a perfect cube nearest to it. > For eg: if > input=4, outpu

[Tutor] Finding a nearest perfect cube

2013-11-07 Thread donsuni
Hi, I am new to python and i have to write a following code without using any inbuilt function or a for loop. Only while and if loops are allowed. If i input a number, i should get a perfect cube nearest to it. For eg: if input=4, output=8 input=8, output=27 and so on can some one help with t

Re: [Tutor] Can someone please help me with this?

2013-11-07 Thread Oscar Benjamin
On 7 November 2013 13:28, Anton Gilb wrote: > > I don't know how to reach all of you that helped me out, but I just want to > extend a huge thank you! You guys are a big help and your time and input is > well appreciated! Hi Anton, you can reach everyone by sending your reply email to tutor@pyt

Re: [Tutor] Can someone please help me with this?

2013-11-07 Thread Oscar Benjamin
On 7 November 2013 02:56, Alex Kleider wrote: > On 2013-11-06 01:52, Oscar Benjamin wrote: > >> >> I'll give one suggestion which is that to concatenate one list onto >> the end of another you would use the .extend() method rather than the >> .append() method. > > > What would be the advantage/dis