Answered step by step
Verified Expert Solution
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:
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. 20Step by Step Solution
There are 3 Steps involved in it
Step: 1
Get Instant Access to Expert-Tailored Solutions
See step-by-step solutions with expert insights and AI powered tools for academic success
Step: 2
Step: 3
Ace Your Homework with AI
Get the answers you need in no time with our AI-driven, step-by-step assistance
Get Started