Question: Write a program called Polynomial.py that lets a user enter the coefficients of a polynomial. The program should then: display the polynomial in its usual

Write a program called Polynomial.py that lets a user enter the coefficients of a polynomial. The program should then:

  • display the polynomial in its usual form. (For example, if the user enters a coefficient of 4.6 for x cubed, -7.3 for x squared, 0 for x, and 9.8 for the constant, it would display: "f(x) = 4.6 x^3 - 7.3 x^2 + 9.8"
  • The highest degree polynomial should be three. (No higher than a cubic equation but the user should be able to enter a quadratic or linear function.)
  • Ask the user to enter a value for x, and then display the result when that value is plugged into the polynomial function. Round to the nearest hundredth.
  • Allow the user to continue entering values for x until he/she decides to quit.

The calculation of plugging in values should be correct for the program to be considered complete.

Also, full or partial credit will be given based on how well the display of the polynomial works, considering tricky cases like coefficients of zero, plus/minus issues, etc. And as usual, user-friendliness and internal comments are required for full credit.

IN PYTHON

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!