Question: In python Use import to access the math module. Given the list [65, 30, 25, 16, 10, 4] , write code to loop over the
In python
-
Use import to access the math module. Given the list [65, 30, 25, 16, 10, 4], write code to loop over the list and print each number and the square root of the number.
-
Use the correct syntax to access the math module, put this at the top of the file
-
Use a for loop to iterate over the list [...] given above
-
In the body of the for loop:
-
Use the sqrt() function in the math module and calculate the square root of each number and store it into variable square_root
-
Print each number and its square root on the same line
-
-
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
