Programming

Programming questions? Ask a programmer for answers ASAP

Connect one-on-one with {0} who will answer your question

Customer Question

1. Determining the Square...

1. Determining the Square Root of a Number Via Recursion For this programming project you will develop an recursive function to find the square root

of a number. The function should the number for which we are determining the

square root and any other arguments you deem necessary. The recursion should

terminate when the calculated square root produces a squared value within 0.001

of the value we are finding the square root of.

The following is required:

1. The user should be prompted to input a positive number.

2. The program should check to determine whether the user entered a valid

number, i.e. -4.0 doesn’t work.

3. The program should call a function called: recursive sqrt(argument, argument, ....) .

4. The recursive square root function should continue to call itself until the

value calculated for the square root when squared is within 0.001 of the

value for which we are calculating the square root.

5. Your calculated value of the square root should be printed to the screen.

6. The program should then use math.sqrt to calculate the value of the square

root and display this as well.

7. How did your calculated square root compare to the value calculated with

math.sqrt

**Technician's Assistant:** Is there a specific language you're coding in?

In Python please

**Technician's Assistant:** What's your objective for this Python project?

1. Determining the Square Root of a Number Via Recursion For this programming project you will develop an recursive function to find the square root

of a number. The function should the number for which we are determining the

square root and any other arguments you deem necessary. The recursion should

terminate when the calculated square root produces a squared value within 0.001

of the value we are finding the square root of.

The following is required:

1. The user should be prompted to input a positive number.

2. The program should check to determine whether the user entered a valid

number, i.e. -4.0 doesn’t work.

3. The program should call a function called: recursive sqrt(argument, argument, ....) .

4. The recursive square root function should continue to call itself until the

value calculated for the square root when squared is within 0.001 of the

value for which we are calculating the square root.

5. Your calculated value of the square root should be printed to the screen.

6. The program should then use math.sqrt to calculate the value of the square

root and display this as well.

7. How did your calculated square root compare to the value calculated with

math.sqrt

**Technician's Assistant:** The Programmer will be able to walk you through that. Anything else you want the programmer to know before I connect you?

That's all,

Show More

Show Less

Was this answer helpful?

Describe your issueThe assistant will guide you

Chat 1:1 with a programmerLicensed Experts are available 24/7

100% satisfaction guaranteeGet all the answers you need

Related Programming Questions

To RajThis is the link. The pages have all the instructions

To Raj This is the link. The pages have all the instructions and each question has to have an individual answer. http://ge.tt/6GlHCOO Thank you Alicia… read more

For LogicPro Only" The __________ keyword allows the

quot;For LogicPro Only" The __________ keyword allows the programmer to declare a set of constant values represented by identifiers.A. ref B. out C. enum D. returnPreceding a parameter with the ______… read more

I hope you can help write this program. The object. The

I hope you can help write this program. The object. The finished program should use recursion to sum the integers from a user specified number to 1. For example, if the user specifies the number 4, th… read more

Quadratic Equation Given a quadratic equation in standard

Quadratic Equation Given a quadratic equation in standard form, ax2 + bx + c = 0, solutions for x can be determined using the quadratic formula, . The values of x can be real or complex. The discrimin… read more

Write a main() function that does the following. Prompt

Write a main() function that does the following. •Prompt the user to enter a double number •Save the double, then use it for input for the following cmath library functions. ◦Square root ◦Log base 10 … read more

In the seventeenth century, Sir Isaac Newton discovered an

In the seventeenth century, Sir Isaac Newton discovered an algorithm for approximating the square root of a positive number. Recall that the square root y of a positive number x is the number y such t… read more

1) Write a program that raises an integer to a positive integer

1) Write a program that raises an integer to a positive integer power. Call the function x_to_the_n taking two integer arguments x and n. Have the function return a long int, which represents the resu… read more

Question 41 Assume that variable sales holds a value

Question 41 Assume that variable sales holds a value of 57.963. Which statement will print "The total sales amount is $57.96"? document.write("The total sales amount is $" + sales.toFixed(2)); documen… read more

Option 2 Use a recursive function to find fractional approximations

Option 2: Use a recursive function to find fractional approximations for the square root of the following three integers: 2, 3 and 5. For the recursive relationship: AN = AN-1 + AN-2 the square root o… read more

I was wondering if you could help me with another programming

I was wondering if you could help me with another programming question? If you can, could you add comments like you did last time? The details for the program are below. Newton's method for calculatin… read more

SCENARIO The math teaher asks you to create an application

SCENARIO: The math teaher asks you to create an application that will display the square and square root of a number. Must have two forms- one for should prompt the student for his/her name; should re… read more

The hypotenuse of a right triangle can be computed if you know

The hypotenuse of a right triangle can be computed if you know the lengths of the other 2 sides (A and B). The hypotenuse is then figured by computing: Hypotenuse = square root (lengthA2 + lengthB2 Wr… read more

How to find the square root of any integer/number a user enters

Write a Python program that will implement Newton's square root estimation technique for any positive number, real or integer, entered by the user. The program will also use the sqrt( ) function from … read more

Write a function that will calculate and display the real roots

Write a function that will calculate and display the real roots of the quadratic equation ax2 + bx + c = 0 Using the quadratic formula x = -b +- square_root(b2 – 4ac ) 2a Assume that a, b, and c are f… read more

Write a program which inputs 2 integers representing the sides

Write a program which inputs 2 integers representing the sides of a triangle, a and b. Next, write a function called findHyptenuse that accepts the 2 sides as parameters and returns the hypotenuse of … read more

Hi I need help on this c++ qn. Given a quadratic equation

Hi I need help on this c++ qn. Given a quadratic equation in standard form, ax2 + bx + c = 0, solutions for x can be determined using the quadratic formula, . The values of x can be real or complex. T… read more

Im trying to write a Javascript program that uses a function

Im trying to write a Javascript program that uses a function which takes an array as input and calculates the square roots of its elements. Can I see an example of what the code would look like for th… read more

Design a function that uses recursion to raise a number to

Design a function that uses recursion to raise a number to a power. The function should accept two arguments: the number to be raised and the exponent. Assume that the exponent is a nonnegative intege… read more

Disclaimer: Information in questions, answers, and other posts on this site ("Posts") comes from individual users, not JustAnswer; JustAnswer is not responsible for Posts. Posts are for general information, are not intended to substitute for informed professional advice (medical, legal, veterinary, financial, etc.), or to establish a professional-client relationship. The site and services are provided "as is" with no warranty or representations by JustAnswer regarding the qualifications of Experts. To see what credentials have been verified by a third-party service, please click on the "Verified" symbol in some Experts' profiles. JustAnswer is not intended or designed for EMERGENCY questions which should be directed immediately by telephone or in-person to qualified professionals.

Ask-a-doc Web sites: If you've got a quick question, you can try to get an answer from sites that say they have various specialists on hand to give quick answers... Justanswer.com.

JustAnswer.com...has seen a spike since October in legal questions from readers about layoffs, unemployment and severance.

Web sites like justanswer.com/legal

...leave nothing to chance.

...leave nothing to chance.

Traffic on JustAnswer rose 14 percent...and had nearly 400,000 page views in 30 days...inquiries related to stress, high blood pressure, drinking and heart pain jumped 33 percent.

Tory Johnson, GMA Workplace Contributor, discusses work-from-home jobs, such as JustAnswer in which verified Experts answer people’s questions.

I will tell you that...the things you have to go through to be an Expert are quite rigorous.

My Expert answered my question promptly and he resolved the issue totally. This is a great service. I am so glad I found it I will definitely use the service again if needed.

New York

Wonderful service, prompt, efficient, and accurate. Couldn't have asked for more. I cannot thank you enough for your help.

Freshfield, Liverpool, UK

This expert is wonderful. They truly know what they are talking about, and they actually care about you. They really helped put my nerves at ease. Thank you so much!!!!

Los Angeles, CA

Thank you for all your help. It is nice to know that this service is here for people like myself, who need answers fast and are not sure who to consult.

Hesperia, CA

I couldn't be more satisfied! This is the site I will always come to when I need a second opinion.

Kernersville, NC

Just let me say that this encounter has been entirely professional and most helpful. I liked that I could ask additional questions and get answered in a very short turn around.

Woodstock, NY

Thank you so much for taking your time and knowledge to support my concerns. Not only did you answer my questions, you even took it a step further with replying with more pertinent information I needed to know.

Elkton, Maryland

< Previous | Next >

ATLPROG

Computer Software Engineer

7,677 satisfied customers

MS in IT.Several years of programming experience in Java C++ C C# Python VB Javascript HTML

LogicPro

Computer Software Engineer

14,160 satisfied customers

Expert in C, C++, Java, DOT NET, Python, HTML, Javascript, Design.

unvadim

Computer Software Engineer

1,168 satisfied customers

Good knowledge of OOP principles. 3+ years of programming experience with Java and C++. Sun Certified Java Programmer 5.0.

lifesaver

Computer Software Engineer

950 satisfied customers

Several years of intensive programming and application development experience in various platforms.

ehabtutor

Computer Software Engineer

936 satisfied customers

Bachelor of computer science, 5+ years experience in software development, software company owner

TheDoctor

Software Engineer

893 satisfied customers

M.S. in Internet Information Systems

The-PC-Guy

Software Engineer

883 satisfied customers

Extensive Knowledge in PHP, MYSQL, CSS & Javascript

< Previous | Next >

Disclaimer: Information in questions, answers, and other posts on this site ("Posts") comes from individual users, not JustAnswer; JustAnswer is not responsible for Posts. Posts are for general information, are not intended to substitute for informed professional advice (medical, legal, veterinary, financial, etc.), or to establish a professional-client relationship. The site and services are provided "as is" with no warranty or representations by JustAnswer regarding the qualifications of Experts. To see what credentials have been verified by a third-party service, please click on the "Verified" symbol in some Experts' profiles. JustAnswer is not intended or designed for EMERGENCY questions which should be directed immediately by telephone or in-person to qualified professionals.