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
alexgriva [62]
3 years ago
7

Encapsulate the following Python code from Section 7.5 in a function called my_sqrt that takes a as a parameter, chooses a start

ing value for x, and returns an estimate of the square root of a.
while True:
a. y = (x + a/x) / 2.0
b. if y == x:
c. break
d. x = y
Computers and Technology
1 answer:
Elden [556K]3 years ago
3 0

Answer:

def my_sqrt(a):

   while True:

       x = a

       y = (x + a / x) / 2

       if (y == x):

           break

       else:

           x = y

   print(x)

   return 0

my_sqrt(5)

Explanation:

The above is a function in Python, and the exact copy as code of what is being given in the question. Its a method to find out the square root of a number which is a here. The while loop has been used as being mentioned in the question, and the variables are defined and calculated as being stated.

You might be interested in
How will bits and bytes of computer networking help in my career goal?
Allisa [31]

Answer:

By helping you learn and understand the very basics of computer networking therefor giving you a building block to use

Explanation:

ive been asked this before

6 0
2 years ago
What is assembler ? ​
kicyunya [14]

Answer:

An assembler is a program that takes basic computer instructions and converts them into a pattern of bits that the computer's processor can use to perform its basic operations.

8 0
3 years ago
Select the correct answer. What is the final step of the object-oriented design process?
Vikentia [17]
D. Writing the methods of the classes
6 0
2 years ago
Suppose that a machine with a 5-stage pipeline uses branch prediction. 15% of the instructions for a given test program are bran
zhenek [66]

Answer:

solution attached below

Explanation:

3 0
3 years ago
What transport layer protocol does DNS normally use?
saveliy_v [14]

Explanation:

DNS uses the User Datagram Protocol (UDP) on port 53 to serve DNS queries. UDP is preferred because it is fast and has low overhead. A DNS query is a single UDP request from the DNS client followed by a single UDP reply from the server.

3 0
3 years ago
Other questions:
  • An enterprise DBMS is automatically capable of serving as a mobile DBMS. There are no special issues raised by mobility. True Fa
    11·1 answer
  • A security analyst is investigating a call from a user regarding one of the websites receiving a 503: Service unavailable error.
    10·1 answer
  • A ________ is a computer or other electronic device connected to a network
    6·1 answer
  • What is the significance of both RAID and IP technologies as precursors to the SAN environment?
    11·1 answer
  • 1. The best program to present numerical data in would be ____. a. Access c. PowerPoint b. Excel d. Word
    6·1 answer
  • If you’re trying to reduce your debt, which of these expenses should you consider cutting out or cutting back on first?
    5·2 answers
  • I WILL MARK BRAINLIEST IF CORRECT!!!!!!!!!!!!!!!!!!!!!!!!!!!!
    10·2 answers
  • A short story, but i remember in 1nd - 5th grade at my elementary school here is the list from first to last for being cool at s
    9·2 answers
  • What does this mean startUp()
    13·1 answer
  • What is the address space of a computer with a 64-bit address bus?
    7·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!