Sequence of Square Roots Write a program that prints the square root values of the first 30 even integers, starting at 1. Use a while statement to achieve this output. Your output should have one value per line. The name of your loop control variable should be value. The loop should increment the value variable by one each iteration through the loop. The use of an if statement is required for this solution. You may assume that the math library (module) has previously been imported for you. 14 15 16 17 18 19 Check My Solution Test Results: ✓ Your program uses the while statement. Your program does not correctly test the required loop control variable (value). Your program correctly increments the required loop control variable (value). Your program correctly computes the value's square root. Your program prints output. Your program uses an if statement to check for even values. 3 tests were not run. X ✓ ✓ print(math.sqrt(value)) # Increment the count of even numbers processed even_count += 1 # Increment the value to check the next integer value += 1 ✓ X 56% of tests passed. Reset

C++ Programming: From Problem Analysis to Program Design
8th Edition
ISBN:9781337102087
Author:D. S. Malik
Publisher:D. S. Malik
Chapter5: Control Structures Ii (repetition)
Section: Chapter Questions
Problem 27PE
icon
Related questions
Question

write python code to solve it thank you!

Sequence of Square Roots
Write a program that prints the square root values of the first 30 even integers, starting at 1. Use a while statement to achieve this output. Your output should have one
value per line. The name of your loop control variable should be value. The loop should increment the value variable by one each iteration through the loop. The use of an if
statement is required for this solution. You may assume that the math library (module) has previously been imported for you.
14
15
16
17
18
19
Check My Solution
print(math.sqrt(value))
# Increment the count of even numbers processed
even_count += 1
# Increment the value to check the next integer
value += 1
Test Results:
X
X
Your program uses the while statement.
Your program does not correctly test the required loop control variable (value).
Your program correctly increments the required loop control variable (value).
Your program correctly computes the value's square root.
Your program prints output.
Your program uses an if statement to check for even values.
3 tests were not run.
56% of tests passed.
Reset
Transcribed Image Text:Sequence of Square Roots Write a program that prints the square root values of the first 30 even integers, starting at 1. Use a while statement to achieve this output. Your output should have one value per line. The name of your loop control variable should be value. The loop should increment the value variable by one each iteration through the loop. The use of an if statement is required for this solution. You may assume that the math library (module) has previously been imported for you. 14 15 16 17 18 19 Check My Solution print(math.sqrt(value)) # Increment the count of even numbers processed even_count += 1 # Increment the value to check the next integer value += 1 Test Results: X X Your program uses the while statement. Your program does not correctly test the required loop control variable (value). Your program correctly increments the required loop control variable (value). Your program correctly computes the value's square root. Your program prints output. Your program uses an if statement to check for even values. 3 tests were not run. 56% of tests passed. Reset
Expert Solution
steps

Step by step

Solved in 3 steps with 2 images

Blurred answer
Knowledge Booster
Types of Loop
Learn more about
Need a deep-dive on the concept behind this application? Look no further. Learn more about this topic, computer-science and related others by exploring similar questions and additional content below.
Similar questions
  • SEE MORE QUESTIONS
Recommended textbooks for you
C++ Programming: From Problem Analysis to Program…
C++ Programming: From Problem Analysis to Program…
Computer Science
ISBN:
9781337102087
Author:
D. S. Malik
Publisher:
Cengage Learning
C++ for Engineers and Scientists
C++ for Engineers and Scientists
Computer Science
ISBN:
9781133187844
Author:
Bronson, Gary J.
Publisher:
Course Technology Ptr
Microsoft Visual C#
Microsoft Visual C#
Computer Science
ISBN:
9781337102100
Author:
Joyce, Farrell.
Publisher:
Cengage Learning,