Write a Python program to plot the function y = x2 using the Matplotlib library.
import matplotlib.pyplot as plt import numpy as np x = np.arange(1, 5) y = x ** 2 plt.plot(x, y) plt.title('Line Graph of y = x²') plt.xlabel('x') plt.ylabel('y') plt.show()