Answered step by step
Verified Expert Solution
Question
1 Approved Answer
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
Step: 1
Get Instant Access to Expert-Tailored Solutions
See step-by-step solutions with expert insights and AI powered tools for academic success
Step: 2
Step: 3
Ace Your Homework with AI
Get the answers you need in no time with our AI-driven, step-by-step assistance
Get Started