Question: I need help in writing a python code for the following problem: Exercise 4.2: Quadratic equations a) Write a program that takes as input three

I need help in writing a python code for the following problem:I need help in writing a python code for the following problem:

Exercise 4.2: Quadratic equations a) Write a program that takes as input three numbers, a, b, and c, and prints out the two solutions to the quadratic equation ax2 + bx + c = 0 using the standard formula -b b2 - 4ac 2a Use your program to compute the solutions of 0.001x2 + 1000x +0.001 = 0. b) There is another way to write the solutions to a quadratic equation. Multiplying top and bottom of the solution above by -b F b2 - 4ac, show that the solutions can also be written as X=- -b7b2 - 4ac Add further lines to your program to print these values in addition to the earlier ones and again use the program to solve 0.001x2 + 1000x + 0.001 = 0. What do you see? How do you explain it? c) Using what you have learned, write a new program that calculates both roots of a quadratic equation accurately in all cases. 20

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Databases Questions!