Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

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

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

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

SQL Antipatterns Avoiding The Pitfalls Of Database Programming

Authors: Bill Karwin

1st Edition

1680508989, 978-1680508987

More Books

Students also viewed these Databases questions

Question

=+c. Determine the internal rate of return (IRR) of the proposal.

Answered: 1 week ago

Question

1. Who should participate and how will participants be recruited?

Answered: 1 week ago