# numpy.poly1d() in Python # Python code explaining# numpy.poly1d()  # importing librariesimport numpy as np  # Constructing polynomialp1 = np.poly1d([1, 2])p2 = np.poly1d([4, 9, 5, 4])  print ("P1 : ", p1)print ("\n p2 : \n", p2)  # Solve for x = 2print ("\n\np1 at x = 2 : ", p1(2))print ("p2 at x = 2 : ", p2(2))  # Finding Rootsprint ("\n\nRoots of P1 : ", p1.r)print ("Roots of P2 : ", p2.r)  # Finding Coefficientsprint ("\n\nCoefficients of P1 : ", p1.c)print ("Coefficients of P2 : ", p2.coeffs)  # Finding Orderprint ("\n\nOrder / Degree of P1 : ", p1.o)print ("Order / Degree of P2 : ", p2.order)