Question: Problem 4. Write Python script that will print out integers 1 through 10, and their square roots and cube roots . Use the list: range
Problem 4. Write Python script that will print out integers 1 through 10, and their square roots and cube roots. Use the list: range (1,11,1) to define the numbers. Use math.pow(x,n) function.To calculate square roots and cube rootes, define function power(def power (x) etc.) that calculates these values. Then, print them out in the form x,sqrt(x),cuberoot(x), one below the other (print command should be outside of the power function). Utilize the for command [e.g., for i in range (1,11,1): ] and at each value of i call the function power(x) to complete the calculation and return the result, and then print the result out on the screen.
Please help, I keep getting float errors and can't get math.pow to work.
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
