import matplotlib.pyplot as pltimport numpy as np
x = np.linspace(-10, 10, 400)y = x*2 - 2x - 2
plt.figure(figsize=(10, 6))plt.plot(x, y, label='y=x²-2x-2', color='b')plt.xlabel('x')plt.ylabel('y')plt.title('Graph of y=x²-2x-2')plt.grid(True)plt.legend()plt.show()
import matplotlib.pyplot as plt
import numpy as np
x = np.linspace(-10, 10, 400)
y = x*2 - 2x - 2
plt.figure(figsize=(10, 6))
plt.plot(x, y, label='y=x²-2x-2', color='b')
plt.xlabel('x')
plt.ylabel('y')
plt.title('Graph of y=x²-2x-2')
plt.grid(True)
plt.legend()
plt.show()