listing partial implementation of the polynomial py module implementation of the polynomial adt using sorted linked list class polynomial create new polynomial object def __init__(selfdegree nonecoefficient none)if degree is none self _polyhead none else self _polyhead _polytermnode(degreecoefficientself _polytail self _polyhead return the degree of the polynomial def degreeself )if self _polyhead is none return - else return self _polyhead degree return the coefficient for the term of the given degree def __getitem__selfdegree )assert self degree(> "operation not permitted on an empty polynomial curnode self _polyhead while curnode is not none and curnode degree >degree curnode curnode next if curnode is none or curnode degree !degree return else return curnode degree evaluate the polynomial at the given scalar value def evaluateselfscalar )assert self degree(> "only non-empty polynomials can be evaluated result curnode self _polyhead while curnode is not none result +curnode coefficient (scalar *curnode degreecurnode curnode next return result polynomial additionnewpoly self rhspoly def __add__selfrhspoly )polynomial subtractionnewpoly self rhspoly def __sub__selfrhspoly )polynomial multiplicationnewpoly self rhspoly def __mul__selfrhspoly )(listing continued