Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

Calculate the Discriminant: write a function called discriminant that takes as parameters three floats a , b , and c , and returns the value

Calculate the Discriminant: write a function called discriminant that takes as parameters three floats a, b, and c, and returns the value of b^2-4ac
Check for the existance of real roots: write a function called has_real_root that takes three float a,b and c as parameters, and returns True if the discriminant is larger than or equal to 0 and False otherwise. Calculate the roots of a quadratic equation: Write a function called get_real_roots
1. Take three floats a,b,and c as perameters and retun the two roots as a tuple
(two roots x1=-b-d/2a and x2=-b+d/2a)
(python language)

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

Database Security XI Status And Prospects

Authors: T.Y. Lin, Shelly Qian

1st Edition

0412820900, 978-0412820908

More Books

Students also viewed these Databases questions

Question

What gets printed after the following program segment is executed?

Answered: 1 week ago

Question

find all matrices A (a) A = 13 (b) A + A = 213

Answered: 1 week ago