Project 17: Get Y for Polynomials
Another Example:
Important: For the Polynomial class we will define a Polynomial by its coefficients. We will define the polynomial above with the following array: [0, 6, -9, 4]. This will essentially list the coefficients from lowest power to the highest power.
0x^0 + 6x^1 + -9x^2 + 4x^3
Project 17: Your program has 2 variables initialized 'co', and 'x'.
'co' is the array of coefficients for the polynomial ({0, 6, -9, 4} for the example above)
'x' is the x-value in which we want the corresponding y-value.
Task: Correctly initialize the variable 'y' that corresponds to the y-value of the polynomial at the given x.
**If your code works for 5 test cases, you can enter your e-mail address
Universal Computational Math Methods:
pow(5,2) returns 25.0
abs(-3.0) returns 3
sqrt(49.0) returns 7.0