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
vovikov84 [41]
3 years ago
7

Package Newton’s method for approximating square roots (Case Study: Approximating Square Roots) in a function named newton. This

function expects the input number as an argument and returns the estimate of its square root. The script should also include a main function that allows the user to compute square roots of inputs until she presses the enter/return key
Computers and Technology
1 answer:
Shtirlitz [24]3 years ago
7 0

Answer:

def newton(n):

       #Define the variables.

       t = 0.000001

       esti = 1.0

       #Calculate the square root

       #using newton method.

       while True:

               esti = (esti + n / esti) / 2

               dif = abs(n - esti ** 2)

               if dif <= t:

                       break

   

       #Return the result.

       return esti

#Define the main function.

def main():

   

       #Continue until user press enters.

       while True:

               try:

         

                       #Prompt the user for input.

                       n = int(input("Enter a number (Press Enter to stop):"))

                       #display the results.

                       print("newton = %0.15f" % newton(n))

     

               except:

                       return

#Call the main function.

main()

You might be interested in
P3. In Section 4.2 , we noted that the maximum queuing delay is (n–1)D if the switching fabric is n times faster than the input
Troyanec [42]

Answer:

All points are explained below in detail.

I hope it will help you

Explanation:

8 0
3 years ago
A digital media professional's computer is too full of video files. She would like to upgrade her computer to have more capacity
defon
To buy a external hard drive
4 0
3 years ago
Read 2 more answers
Write a short note on Computer<br>impact on<br> our society?​
Vesna [10]

well not a note but here are some few points

Explanation:

1 Computers can have the huge impact on employment of people like job and other stuff.

2 lots of human can be jobless or unemployed

3 it can cuz impact on the health of peoples

4 it also can make us lazy and and lack of self knowledge

8 0
2 years ago
Read 2 more answers
You complete your database, and the company begins using it. Shortly afterwards, two GearUp buyers, Cora and Owen, work together
Olegator [25]

Answer: Multi-user issue

Explanation: A database management system scheme can have multi-user issue when the designing of the system is not made properly. The multi user issue rises when the users concurrently access the data from the database and related error get invoked due to some reason like  repeatable reading issue, serialization, etc.

The reading problem is usually can be related to reading of the database in  uncommitted manner, uncommitted reading, repeatedly reading etc.Thus, Cora and Owen are accessing the database concurrently which can create multi-user issue.

3 0
3 years ago
The computer stores a program while the program is running, as well as the data thatthe program is working with, in _____.
kenny6666 [7]

hard drive is wht the awnser is

8 0
3 years ago
Other questions:
  • 4. When you're working with a word processing document and you press the Del key, what happens?
    8·2 answers
  • A(n) _______ allows an attacker to use a network structure to send large volumes of packets to a victim.
    5·1 answer
  • A year in the modern Gregorian Calendar consists of 365 days. In reality, the earth takes longer to rotate around the sun. To ac
    11·2 answers
  • How is a computer component, such as a network card, commonly marked for identification?
    12·1 answer
  • Scientific models can be used for a variety of different purposes. Which of the following statements about scientific models is
    7·2 answers
  • _____ can render data useless to unauthorized users who might have violated some of the database security layers.
    7·1 answer
  • Why are ethics important in PR?
    8·1 answer
  • Define a function in Scheme (or relation in Prolog) that checks whether a set of elements (represented as a list) is a subset of
    10·1 answer
  • Wht is these things Aᔑ bʖ cᓵ d↸ eᒷ f⎓ g⊣ h⍑ i╎
    15·2 answers
  • How do you use switch board in the office​
    6·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!