Sololearn: Learn to Code
New course! Every coder should learn Generative AI!
Try a free lesson
+ 3
def nthRoot(x, n=2): return x**(1/n) print(nthRoot(27, 3)) >>>output: 3 print(nthRoot(16)) >>>output: 4 (n is automatically set to 2 if not declared as an argument)
18th Jun 2019, 9:57 PM
Mo Hani
Mo Hani - avatar
+ 2
This code does that, but it uses taylor-polynomes, which can be quite hard, but taylor-polynomes are awsome!!! 😄 You should check it out on wikipedia (or some where else). https://code.sololearn.com/cs5g4ro90M55/?ref=app
18th Jun 2019, 9:39 PM
Anton Böhler
Anton Böhler - avatar
- 1
Is this is a question
26th Jun 2019, 9:16 AM
Vasanth Samula
Vasanth Samula - avatar