Question: In python, write a function called loopy_roots that takes no parameters. Using a for loop, print the square root of every integer between 1 and
In python, write a function called loopy_roots that takes no parameters. Using a for loop, print the square root of every integer between 1 and 10 in this format: "integer : root". For example:
1 : 1.0
...
Call the function in main(). Hints: Use math.sqrt (example call: math.sqrt(2)) to get the square root of each integer. You will need to import math. What variable increases with every iteration of the loop? You might want to use it.
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
