PYTHON Programming:
A quadratic equation (Links to an external site.) can be given
in the form of ax2 + bx + c = 0 where a, b, c are real numbers and
x is the independent variable. A given quadratic equation
(b2 - 4ac) has real roots only when the discriminant of the
quadratic equation, is greater than or equal to zero. Write a
Python function named, prg_question_2 to check whether a given
quadratic equation in above form with given parameters, a, b, c has
real roots.
Do the following:
1.Write only the algorithm as code comments (2 points)
2.Implement your function (5 points)
3. Test your function for the equations, x2 + 5x + 6 = 0 and x2
+ x + 1 = 0 (3 points)
PYTHON Programming: A quadratic equation (Links to an external site.) can be given in the form of ax2 + bx + c = 0 where
-
answerhappygod
- Site Admin
- Posts: 899604
- Joined: Mon Aug 02, 2021 8:13 am
PYTHON Programming: A quadratic equation (Links to an external site.) can be given in the form of ax2 + bx + c = 0 where
Join a community of subject matter experts. Register for FREE to view solutions, replies, and use search function. Request answer by replying!