Question: Thonny - /Users/peytonballou/Downloads/roots_original(1).py @ 1 STOP roots_original(1).py myscript.py pizza.py split.py 1 import math 2 3 a = float(input('Enter a ')) 4 b = float(input('Enter b
Thonny - /Users/peytonballou/Downloads/roots_original(1).py @ 1 STOP roots_original(1).py myscript.py pizza.py split.py 1 import math 2 3 a = float(input('Enter a ')) 4 b = float(input('Enter b ) 5 c = float(input('Enter c')) 6 7 disc = b**2-4*a*c 8 rt = math.sqrt(disc) 9 x1 = (- b - rt)/(2*a) 10 x2 = (b + rt)/(2*a) 11 print(x1,x2) 12 Modify roots_original.py to print "Roots are imaginary" when the discriminant is less than 0 and otherwise to use the correct formulas to account for loss of significance (Sauer 0.4) use the original and the modified programs to find the roots of 3*x^2 - 10*x - 100 3*x^2 - 10*x + 100 3*x^2 - 10^20*x + 100 (float() can handle numbers entered in scientific notation) X^2 + 3*X - 10^(-20) x^2 - 3*x - 10^-20) Describe the results. (Attach a text file or post your notes below.)
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
