anonymous
  • anonymous
#Mooc question In exercise 1.4, MIT6_189IAP11_hw1.pdf, how do I code for a 4th root in python. The problem that I am struggling with is finding the 4th root of -19+100. I know the answer but I don't know how to code it. I used the math.sqrt for one of the earlier problems.
MIT 6.189 A Gentle Introduction to Programming Using Python (OCW)
At vero eos et accusamus et iusto odio dignissimos ducimus qui blanditiis praesentium voluptatum deleniti atque corrupti quos dolores et quas molestias excepturi sint occaecati cupiditate non provident, similique sunt in culpa qui officia deserunt mollitia animi, id est laborum et dolorum fuga. Et harum quidem rerum facilis est et expedita distinctio. Nam libero tempore, cum soluta nobis est eligendi optio cumque nihil impedit quo minus id quod maxime placeat facere possimus, omnis voluptas assumenda est, omnis dolor repellendus. Itaque earum rerum hic tenetur a sapiente delectus, ut aut reiciendis voluptatibus maiores alias consequatur aut perferendis doloribus asperiores repellat.

Get our expert's

answer on brainly

SEE EXPERT ANSWER

Get your free account and access expert answers to this
and thousands of other questions.

anonymous
  • anonymous
#Mooc question In exercise 1.4, MIT6_189IAP11_hw1.pdf, how do I code for a 4th root in python. The problem that I am struggling with is finding the 4th root of -19+100. I know the answer but I don't know how to code it. I used the math.sqrt for one of the earlier problems.
MIT 6.189 A Gentle Introduction to Programming Using Python (OCW)
schrodinger
  • schrodinger
I got my questions answered at brainly.com in under 10 minutes. Go to brainly.com now for free help!
At vero eos et accusamus et iusto odio dignissimos ducimus qui blanditiis praesentium voluptatum deleniti atque corrupti quos dolores et quas molestias excepturi sint occaecati cupiditate non provident, similique sunt in culpa qui officia deserunt mollitia animi, id est laborum et dolorum fuga. Et harum quidem rerum facilis est et expedita distinctio. Nam libero tempore, cum soluta nobis est eligendi optio cumque nihil impedit quo minus id quod maxime placeat facere possimus, omnis voluptas assumenda est, omnis dolor repellendus. Itaque earum rerum hic tenetur a sapiente delectus, ut aut reiciendis voluptatibus maiores alias consequatur aut perferendis doloribus asperiores repellat.

Get this expert

answer on brainly

SEE EXPERT ANSWER

Get your free account and access expert answers to this
and thousands of other questions

anonymous
  • anonymous
I had the same question http://openstudy.com/study?login#/updates/507db758e4b0eba0db5e9c9e Best way is use ** operator with 1/4
anonymous
  • anonymous
Thank you. That works
anonymous
  • anonymous
I did X**.25

Looking for something else?

Not the answer you are looking for? Search for more explanations.

More answers

anonymous
  • anonymous
I puzzled over this wondering if Python had some special way to solve it. I then remembered that a root is the same as the exponential of the reciprocal so x = y**(1/4) Is there a more Pythonesque way to write this?
anonymous
  • anonymous
Oh. that should have been x = y**(1.0/4)
velumani
  • velumani
a longer coding way would be to "import" math module and use math.sqrt function twice, like, math.sqrt(math.sqrt(x)) !!
anonymous
  • anonymous
Is there a way if you import the math module to make an n-root instead of using two square roots in a row ?
velumani
  • velumani
@Kyol: When i looked for function that could do the nth root in the math module, i found none. But, there is the power function [pow()], the same as what @peterdb has stated above (which is simple and better). Then why import math function ...??!!

Looking for something else?

Not the answer you are looking for? Search for more explanations.