import matplotlib.pyplot as pltimport numpy as np
x = np.linspace(-10, 5, 100)y = -(x + 2)**2 + 1
plt.plot(x, y)plt.title('Graph of y = -(x + 2)^2 + 1')plt.xlabel('x')plt.ylabel('y')plt.grid(True)plt.show()
import matplotlib.pyplot as plt
import numpy as np
x = np.linspace(-10, 5, 100)
y = -(x + 2)**2 + 1
plt.plot(x, y)
plt.title('Graph of y = -(x + 2)^2 + 1')
plt.xlabel('x')
plt.ylabel('y')
plt.grid(True)
plt.show()