[Tutor] Cube root
Joel Goldstick
joel.goldstick at gmail.com
Sun Sep 16 00:24:21 CEST 2012
On Sat, Sep 15, 2012 at 5:36 PM, Dave Angel <d at davea.name> wrote:
> On 09/15/2012 05:28 PM, Amanda Colley wrote:
>> Ok, I have to get input from a user ('enter a number') and then get the
>> cube root of that number. I am having trouble with the code to get the
>> cube root. If anyone can help me solve this I would greatly appreciate it.
>> ('enter a number')
>> n=number
>> ??? cube root??
>>
>>
>
> The operator to raise a number to a particular power is **, and it's not
> constrained to integer powers. So 5*2 is 25. See what's next?
>
This is a great place to ask questions. But don't forget google (or bing)
try googling python cube root
see how you do and come back with your code!
--
Joel Goldstick
More information about the Tutor
mailing list