Question: Write a Python script that prompts the user to enter two real (i.e., decimal) numbers and outputs an equation for a quadratic function that has
Write a Python script that prompts the user to enter two real (i.e., decimal) numbers and outputs an equation for a quadratic function that has those two real numbers as zeros and a leading coefficient of 1. You should print the equation in the form: y = x**2 + sBBx + sCC, where sBB and sCC are the last 2 coefficients of the equation, rounded down to the nearest integer and printed with 2 digits and a sign (+ or -). You may assume that the coefficients will not be 3 or more digits (100+). For example, if the user entered -1 and 1 as zeros, the equation y = (x - 1)(x + 1) = x^2 - 1 would have these two values as zeros, and y = (x - x1) * (x - x2) will have zeros at x1 and x2, in general.
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
