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
Convert the following four unsigned binary numbers to decimal and show your work:
Ber [7]

Answer:

23 ,21,10,63,13

Explanation:

We have to convert binary to decimal

10111 corresponding decimal number is

1\times 2^4+0\times 2^3+1\times 2^2+1\times 2^1+1\times 2^0=23

10101 corresponding decimal number is

1\times 2^4+0\times 2^3+1\times 2^2+0\times 2^1+1\times 2^0==21

01010 corresponding decimal number is

0\times 2^4+1\times 2^3+0\times 2^2+1\times 2^1+0\times 2^0=10

111111 corresponding decimal number is

1\times 2^5+1\times 2^4+1\times 2^3+1\times 2^2+1\times 2^1+1\times 2^0=63

001111 corresponding decimal number is

0\times 2^5+0\times 2^4+1\times 2^3+1\times 2^2+1\times 2^1+1\times 2^0=13

7 0
3 years ago
Which of these consoles have 64 bit architecture
tigry1 [53]

I don't know if this is on your list, but I know for a fact that the Nintendo 64 system (or N64) has a 64-bit architecture.

8 0
3 years ago
One concern some users have about storing data or accessing applications in the cloud is .
andriy [413]

Answer:

Explanation:

Security is the primary concern about cloud computing. This is the main for many IT departments to refrain from using cloud computing. Some things that put the security of cloud computing to be concerned are: Theft or loss of intellectual property.

3 0
2 years ago
How did Matt Pyke and Karsten Schmidt create the advertisement for Audi? Multiple choice question. Filmed the car as wind tossed
saw5 [17]

Matt Pyke and Karsten Schmidt wrote a programming code that created the video which they used for the advertisement for Audi. Thus, Option D is the correct statement.

<h3>What is a programming code?</h3>

Programming code refers back to the set of instructions, or a system of rules, written in a specific programming language (i.e., the source code).

It is likewise the term used for the source code after it's been processed with the aid of using a compiler and made ready to run on the computer (i.e., the object code).

Therefore, Matt Pyke and Karsten Schmidt wrote a programming code that created the video which they used for the advertisement for Audi. Option D is the correct statement.

Learn more about programming code:

brainly.com/question/25770844

#SPJ1

8 0
1 year ago
Which element of a business document provides additional information but is not a part of the body of the text?
Vaselesa [24]

The subject is generally covered inside the body of text, so that one's out.

The footer is a completely separate part of the document, specifically the bottom-most portion of the page, but let's look at the others.

The salutation is placed at the beginning of the body of text.

And your closing note is placed at the end of the body of text.

So, the best answer would be b. footer.

3 0
3 years ago
Read 2 more answers
Other questions:
  • You are tasked with setting up an employee’s computer.Instead of a new computer,she will be using a computer with an older opera
    11·2 answers
  • Derek found that the CPU was running several processes. While Derek was looking at Task Manager, the computer crashed. Derek res
    15·2 answers
  • The prediction that the number of transistors on a chip would double about every two years is known as ________. Metcalfe's law
    6·1 answer
  • Search engines that search other search engines are called
    12·2 answers
  • If you’re paid hourly and work 40 hours in one week how much overtime have you worked? 8 hours none $48 or $80
    9·2 answers
  • Which of the following defines a network
    7·1 answer
  • Find the basic period and basic frequency of the function g(t)=8cos(10πt)+sin(15πt)
    9·1 answer
  • Please helpppppppppppppp
    11·1 answer
  • when inserting a bibliography one choose from multiple ______ of bibliographies.[insert Bibliography]
    12·1 answer
  • The international system of units is very important to our worldwide science community because it is easier for scientists to sh
    12·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!