How to draw parabola using python? | Sololearn: Learn to code for FREE!
New course! Every coder should learn Generative AI!
Try a free lesson
+ 1

How to draw parabola using python?

y^2=4ax be the general equation of required parabola

19th Dec 2018, 9:53 AM
Namish Kucharkal
2 Answers
+ 5
from numpy import * from matplotlib.pyplot import plot, show, savefig a = 1 y = arange(-10, 10, 0.01) x = y**2 / 4*a plot(x, y) savefig('test.png')
19th Dec 2018, 10:57 AM
Prokopios Poulimenos
Prokopios Poulimenos - avatar