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]
4 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]4 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
A(n) Answer display color uses the least electricity when compared to any other color.
Elan Coil [88]

Is there answer choices because I’m not understanding what you want me to answer

3 0
3 years ago
Consider the given choices and determine which one establishes a conceptual framework for network connectivity.
Snezhnost [94]

Of the given choices, the option that establishes a conceptual framework for network connectivity is OSI model.

<h3>What is network connectivity?</h3>

Network connectivity is a term that tells more about the process of connecting different areas of a network to each other.

Conclusively, the OSI Model often called Open Systems Interconnection Model is known to be the conceptual framework that tells the functions or duties of a networking system.

Learn more about  network connectivity from

brainly.com/question/26956118

5 0
2 years ago
Write a program in Java programming language to display or calculate “Hello, Daddy and Mum”
olganol [36]

Answer:

class Simple{

public static void main(String args[]){

System.out.println("Hello Daddy and Mum);

}

}

Explanation:

First, we create a class, then a method and then give the Integrated Data Environment (IDE) the command to give out an output that says Hello, Daddy and Mum”

8 0
3 years ago
Does anyone know any nitro type hack??
alexgriva [62]

Answer:

yes nitro hack is where they time your hacking skills

5 0
4 years ago
Read 2 more answers
What is the function below Missing?
Nat2105 [25]

Answer:

I think a closing bracket.. sorry if its wrong.

Explanation:

3 0
3 years ago
Read 2 more answers
Other questions:
  • Write a Bash script that searches all .c files in the current directory (and its subdirectories, recursively) for occurrences of
    14·1 answer
  • What is the purpose for adding images and graphics to a web page?
    5·1 answer
  • A data mart differs from a data warehouse in that: Group of answer choices it deals with a particular component or functional ar
    13·1 answer
  • When a CPU executes instructions as it converts input into output, it does so with
    12·1 answer
  • I really need this right now i just cant understand
    8·1 answer
  • Package Newton’s method for approximating square roots (Case Study 3.6) in a function named newton. This function expects the in
    7·1 answer
  • Which student's strategy likely found the most academic success?
    6·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
    5·2 answers
  • When creating a shape in Word, what are some available options? Check all that apply. adding text to the shape changing the size
    6·1 answer
  • The sequence of Figures shows a pattern. if the pattern repeats, how many triangles will the figure 5 have ?​
    7·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!