[Tutor] Finding a nearest perfect cube

Joel Goldstick joel.goldstick at gmail.com
Fri Nov 8 11:12:39 CET 2013


On Fri, Nov 8, 2013 at 4:36 AM, Mark Lawrence <breamoreboy at yahoo.co.uk> wrote:
> On 07/11/2013 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.

This is confusing.  What is an 'if loop'?  Of course your instructor
didn't say that that.  Well, if he did, you should get your money back
and drop the course.  It will be better to help you if you actually
print the exact assignment.
>>
>> 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 the code?
>>
>
> Impossible as stated above, how do you get input without using an inbuilt
> function?  I'd also like to see you write an if loop.
>
> --
> Python is the second best programming language in the world.
> But the best has yet to be invented.  Christian Tismer
>
> Mark Lawrence
>
>
> _______________________________________________
> Tutor maillist  -  Tutor at python.org
> To unsubscribe or change subscription options:
> https://mail.python.org/mailman/listinfo/tutor



-- 
Joel Goldstick
http://joelgoldstick.com


More information about the Tutor mailing list