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

  1. 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.

    1. Use the correct syntax to access the math module, put this at the top of the file

    2. Use a for loop to iterate over the list [...] given above

    3. In the body of the for loop:

      1. Use the sqrt() function in the math module and calculate the square root of each number and store it into variable square_root

      2. Print each number and its square root on the same line

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Databases Questions!