Question: Polynomial class In PYTHON You are to implement a Polynomial class that supports an integer polynomial datatype. Quite often, such a datatype can be implemented
Polynomial class In PYTHON
You are to implement a Polynomial class that supports an integer polynomial datatype. Quite
often, such a datatype can be implemented using a list or an array. However, our Polynomials
will be sparse, meaning that a lot of terms will be zero. In such a case, only the nonzero terms
should be stored in the data structure. For this assignment, you must use a linked list to store
the nonzero terms of the polynomial.You are to provide the methods iszero evala degree and lowestterm The
iszero method returns a Boolean that reports whether the polynomial is the zero
polynomial. The evala method returns the evaluation of the polynomial at The
degree method returns the degree of the polynomial; for simplicity, return for the
zero polynomial. Strictly speaking, the degree of the zero polynomial is undefined. The
lowestterm method returns the exponent of the lowest nonzero term.
You are to provide the method horners that will return a string of the Horner's rule
representation of the polynomial. The Horner's rule representation of the polynomial
dots. is the string xx:dotsdots Zero terms and
a coefficient of must not be included in the return string. For example, for the
polynomial the method should return the string
Step by Step Solution
There are 3 Steps involved in it
1 Expert Approved Answer
Step: 1 Unlock
Question Has Been Solved by an Expert!
Get step-by-step solutions from verified subject matter experts
Step: 2 Unlock
Step: 3 Unlock
