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
How did sea lamprey get here
maw [93]
Reproduction. One layed some eggs then another and another and then BOOM here they are.
6 0
3 years ago
A specialized storage device or group of storage devices that provides centralized fault-tolerant data storage for a network____
gogolik [260]

Answer: NAS(Network-attached storage)

Explanation:

NAS(Network-attached storage) is the file storage in computer server which links to computer network. It is used by heterogeneous client or group of other various users to access files data.

  • It can retrieve data from shared folder storage in network.It can provide serving file feature through standard, hardware,configuration or  software.
  • It provides high speed service of sharing and serving files, continuous work in faulty situation, easy configuration, simple accessing of data etc.

5 0
3 years ago
What are the correct steps to find the system specifications such as the amount of ram or system type for windows 7 machine?
Nutka1998 [239]

First, click the Start button. Then, select Control Panel. Next, go to System and Security. To find out the amount of RAM and system type of your device, select System. The information you need will be displayed along with the type of processor, computer name, domain, and windows activation details.

5 0
3 years ago
8. When requesting a review of a denied claim, it is required to send a _______________ with the claim.
liq [111]
I'd say an appeal letter.

An appeal letter should be sent with the claim to request for review of an insurance claim that has been denied or underpaid by an insurance company. An appeal is important because it lets the insurance company know that you disagree with the decisions they have issued



4 0
3 years ago
Charles would like to quickly find the name of the document he is currently working on. He should look at the
Sindrei [870]
Header or title. It is at the top of the document.
4 0
3 years ago
Read 2 more answers
Other questions:
  • While in slide show mode, if you are not careful you can close the application by clicking the x on the menu bar
    12·2 answers
  • Which option will enable Mina to apply several formats to the spreadsheet cells at the same time?
    5·1 answer
  • A restaurant has a case type that allows customer to book the dining room for events. Customers provide basic information includ
    7·1 answer
  • Which statement describes a printer driver? a) It is the configuration code that is sent to a printer to identify the operating
    5·1 answer
  • Universal Containers is creating a custom Visualforce page to allow users to edit contact records. The developer has used an ape
    6·1 answer
  • Which of the following is a hardware component used to hold the BitLocker encryption key and ensures encrypted data is not acces
    5·1 answer
  • You are configuring a firewall to use NAT. In the configuration, you map a private IP address directly to a persistent public IP
    9·1 answer
  • Write two example use of relationships ICT
    11·1 answer
  • Ayuda pliz es para ya!!!!!<br> nesesito un codigo html que me muestre este texto
    8·1 answer
  • 236. A system such as a printer, smart TV, or HVAC controller, typically uses an operating system on what is called a:
    13·2 answers
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!