A quadratic equation 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 has real roots only when the discriminant of the quadratic equation, (b2 - 4ac) is greater than or equal to zero. Write a function named, prg_question_1 to check whether a given quadratic equation in above form with given parameters, a, b, c has real roots. Do the following: 1. Follow UMPIRE process to get the algorithm. Write only the algorithm as code comments 2. Implement your function 3. Test your function for the equations, x² + 5x + 6 = 0 and x² + x + 1 = 0. Please follow the test criteria given in the code template. 4. Include your solution in the file you will submit at the "Code submission" question at the end

icon
Related questions
Question

Please help me now

 

A quadratic equation can be given in the form of ax² + bx + c = 0 where a, b, c are
real numbers and x is the independent variable. A given quadratic equation has real
roots only when the discriminant of the quadratic equation, (6²-4ac) is greater than
or equal to zero.
DE
Write a function named, prg_question_1 to check whether a given quadratic equation
in above form with given parameters, a, b, c has real roots.
Do the following:
1. Follow UMPIRE process to get the algorithm. Write only the algorithm as code
comments
2. Implement your function
3. Test your function for the equations, x² + 5x + 6 = 0 and x² + x + 1 = 0. Please
follow the test criteria given in the code template.
4. Include your solution in the file you will submit at the "Code submission" question
at the end
Transcribed Image Text:A quadratic equation can be given in the form of ax² + bx + c = 0 where a, b, c are real numbers and x is the independent variable. A given quadratic equation has real roots only when the discriminant of the quadratic equation, (6²-4ac) is greater than or equal to zero. DE Write a function named, prg_question_1 to check whether a given quadratic equation in above form with given parameters, a, b, c has real roots. Do the following: 1. Follow UMPIRE process to get the algorithm. Write only the algorithm as code comments 2. Implement your function 3. Test your function for the equations, x² + 5x + 6 = 0 and x² + x + 1 = 0. Please follow the test criteria given in the code template. 4. Include your solution in the file you will submit at the "Code submission" question at the end
Expert Solution
trending now

Trending now

This is a popular solution!

steps

Step by step

Solved in 4 steps with 2 images

Blurred answer
Similar questions