1answer.
Ask question
Login Signup
Ask question
All categories
  • English
  • Mathematics
  • Social Studies
  • Business
  • History
  • Health
  • Geography
  • Biology
  • Physics
  • Chemistry
  • Computers and Technology
  • Arts
  • World Languages
  • Spanish
  • French
  • German
  • Advanced Placement (AP)
  • SAT
  • Medicine
  • Law
  • Engineering
Kazeer [188]
2 years ago
11

Write a function named test_sqrt that prints a table like the following using a while loop, where "diff" is the absolute value o

f the difference between my_sqrt(a) and math. Sqrt(a).
SAT
1 answer:
9966 [12]2 years ago
6 0

The function illustrated the use and the application of the while loops

While loops are used to perform iterative operations

The test_sqrt function in Python is as follows:

#This imports the math module

import math

#This defines the test_sqrt function    

def test_sqrt():

   #This initializes variable a to 1

   a = 1

   #The following is iterated for the values of variable a from 1 to 25

   while a<=25

   #This prints the required output

   print('a =', a,'| my_sqrt(a) =',my_sqrt(a),'| math.sqrt(a) =', math.sqrt(a),'| diff =', abs(math.sqrt(a)-my_sqrt(a)))

   #This increments a by 1

   a = a + 1

Note that:

Comments are used to explain each line in the above function

Read more about while loop at:

brainly.com/question/12736327

You might be interested in
HELP
RoseWind [281]

Answer:the load or the voltage

Explanation:

3 0
3 years ago
___________ is the ability of a product to satisfy a customer. a. economic utility b. value c. purchasing power d. outsourcing p
Zielflug [23.3K]

Answer:

b. value is the answer to this question

8 0
2 years ago
A lizard born in 1985,1986 died. At the time of death he was 13 years old. How?
Ludmilka [50]

Answer:

because his time expired and he was old in age. death took him and he died :)

4 0
3 years ago
What formal power would the president use to enact an economic stimulus bill?.
Klio2033 [76]

The president has the formal power of enacting an economic stimulus bill by approving/signing the bill which congress has passed

what is a formal power of the president?

The formal powers of the president are powers that emanate or are traced to the constitution of the country. These ate powers that the president has by right of the laws in the constitution.

Formally, the president of the United states of America(being federally constituted) may approve/sign a bill presented to him by the congress or disapprove by power of veto.

The president may also be able to influence congress for a particular bill and this is an informal power.

Please read more about formal power here:

brainly.com/question/3557008

4 0
3 years ago
Why do states need to be concerned about laws passed in other states.
jeka94

Answer:

Mark me as brain list plz for fun

Explanation:

Roy is the did

5 0
2 years ago
Other questions:
  • Please help!!!!! Question three
    13·2 answers
  • What are the two main purposes of Edgar Allen Poe’s, “The Masque of the Red Death?”
    13·2 answers
  • Transferable skills necessary for successful employment include
    11·1 answer
  • How many soccer players are there that are only getting paid as a career?? PLZ give correct info Thnx!!
    13·1 answer
  • Speeches about trust
    13·2 answers
  • PS4 or XBOX Which one is the best
    15·2 answers
  • 10 points and choose 3 lines of what it is and please be right
    15·1 answer
  • A student is given a sample of matter to classify. The sample is uniform in color and texture. Based on this information, the st
    14·1 answer
  • What if? if the ramp is 4. 00 m long, what is the maximum coefficient of friction that would allow the block to reach the end of
    11·1 answer
  • True or false: the note the detectives found inside the locker was important to the investigation. True false
    6·2 answers
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!