import numpy as npimport matplotlib.pyplot as plt
x = np.linspace(-10, 10, 100)y_quad = x2y_cubic = x3
plt.figure(figsize=(10, 6))plt.plot(x, y_quad, label='y = x^2', color='blue')plt.plot(x, y_cubic, label='y = x^3', color='red')
plt.axhline(0, color='black',linewidth=0.5)plt.axvline(0, color='black',linewidth=0.5)
plt.legend()plt.title('Graph of y = x^2 and y = x^3')plt.xlabel('x')plt.ylabel('y')
plt.grid(True)plt.show()
import numpy as np
import matplotlib.pyplot as plt
x = np.linspace(-10, 10, 100)
y_quad = x2
y_cubic = x3
plt.figure(figsize=(10, 6))
plt.plot(x, y_quad, label='y = x^2', color='blue')
plt.plot(x, y_cubic, label='y = x^3', color='red')
plt.axhline(0, color='black',linewidth=0.5)
plt.axvline(0, color='black',linewidth=0.5)
plt.legend()
plt.title('Graph of y = x^2 and y = x^3')
plt.xlabel('x')
plt.ylabel('y')
plt.grid(True)
plt.show()