poly1d performs polynomial arithmetic.
This requires the numpy and matplotlib libraries.
import numpy as np
import matplotlib.pyplot as plt
x = np.array([-1, -0.8, -0.6, -0.4, -0.2, 0, 0.2, 0.4, 0.6, 0.8, 1])
w = np.array([-2, 3,-0.5]) # Polynomial coefficients
y = np.poly1d(w)(x)
plt.plot(x, y) # Draw a graph
plt.show()