Computer Science, asked by amitrathor7884, 11 months ago

Write a python program to plot the function y = x2 using the pyplot or matplotlib libraries

Answers

Answered by vigneshsatheesh
1

Answer:

Below code will graph simple parabola y = x^2. The range of function would be (-50, 50) to get a parabolic form.

Explanation:

import matplotlib.pyplot as plt

x_cords = range(-50,50)

y_cords = [x*x for x in x_cords]

plt.plot(x_cords, y_cords)

plt.show()

Mark me as the brainliest

Similar questions