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
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
Related questions
Question
Please help me now
Expert Solution
This question has been solved!
Explore an expertly crafted, step-by-step solution for a thorough understanding of key concepts.
This is a popular solution!
Trending now
This is a popular solution!
Step by step
Solved in 4 steps with 2 images