Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

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:image text in transcribed

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

Step: 1

blur-text-image

Get Instant Access to Expert-Tailored Solutions

See step-by-step solutions with expert insights and AI powered tools for academic success

Step: 2

blur-text-image

Step: 3

blur-text-image

Ace Your Homework with AI

Get the answers you need in no time with our AI-driven, step-by-step assistance

Get Started

Recommended Textbook for

Expert Oracle9i Database Administration

Authors: Sam R. Alapati

1st Edition

1590590228, 978-1590590225

More Books

Students also viewed these Databases questions

Question

=+Where do you want to live and work?

Answered: 1 week ago