Q1) Best known iterative method for calculating roots of a function f (that is, x-values for which f(x) is 0) is Newton-Raphson approximation. To find the zero of a function whose derivative is also known, compute
xnew = xold - f (xold) f′(xold).
For this exercise, write a program to compute nth roots of floating-point numbers. Prompt the user for a and n, then obtain n a by computing a zero of the function f(x) = xn - a.