Question: This is for python, thank you. need code to copy, thank you Third Week Laboratory: Conditional Statements and For Loops 1. A program that asks


This is for python, thank you. need code to copy, thank you
Third Week Laboratory: Conditional Statements and For Loops 1. A program that asks the user for input, the strength of an earthquake, and then prints out a string according to the following table. Values below 1 are not on the Richter scale and should result in an error message. Magnitude Description Micro [2, 4) [4, 5) [5,6) [6, 7) [7,8) Minor Light Moderate Strong Major Great 2. Heron's method calculates an approximation to the square-root. If S is the number whose square-root is to be taken, and a is an approximation of the square-root, then Heron's method calculates a better approximation by "bettera- For example, if S 2 and we choose a -1, then the better approximation according to Heron's is 1.5. If we apply the method again, then we get 1.4166666666666665. Another application gives us 1.4142156862745097, which is already accurate to the fifth digit after the decimal. Write a program that asks the user for a number. Calculate an approximation of the square-root by starting out with initial approximation 1 and then running Heron's method twenty times to get a better approximation. (Hint: You need to use a for loop. In the body of the for-loop, you improve the value of a.) Third Week Laboratory: Conditional Statements and For Loops 1. A program that asks the user for input, the strength of an earthquake, and then prints out a string according to the following table. Values below 1 are not on the Richter scale and should result in an error message. Magnitude Description Micro [2, 4) [4, 5) [5,6) [6, 7) [7,8) Minor Light Moderate Strong Major Great 2. Heron's method calculates an approximation to the square-root. If S is the number whose square-root is to be taken, and a is an approximation of the square-root, then Heron's method calculates a better approximation by "bettera- For example, if S 2 and we choose a -1, then the better approximation according to Heron's is 1.5. If we apply the method again, then we get 1.4166666666666665. Another application gives us 1.4142156862745097, which is already accurate to the fifth digit after the decimal. Write a program that asks the user for a number. Calculate an approximation of the square-root by starting out with initial approximation 1 and then running Heron's method twenty times to get a better approximation. (Hint: You need to use a for loop. In the body of the for-loop, you improve the value of a.)
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
