Question: A Python function called printPolynomial with a single parameter: a polynomial P. Keep in mind that P is a list. This function prints out the

A Python function called printPolynomial with a single parameter: a polynomial P. Keep in mind that P is a list. This function prints out the polynomial. The polynomial must be printed nicely. This means that only terms with non-zero coefficients must be printed out and the terms must be printed from largest exponent to the smallest. Furthermore, if the coefficient of a term is negative, the - (minus sign) must be embedded in the printed polynomial. For example, if the polynomial is 12x 6 + 5x 5 20x 4 + 8x 2 12x + 9, it should be printed as -12x^6 + 5x^5 - 20x^4 + 8x^2 - 12x + 9 and not as -12x^6 + 5x^5 + -20x^4 + 0x^3 + 8x^2 + -12x + 9x^0

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Databases Questions!