title: Python Graphing a Parabola using Matplotlib
body: <p>How can I build a graph using this function? Thanks! :) I tried, but I am getting confused how should I use: <a href="https://stackoverflow.com/questions/30553585/graphing-a-parabola-using-matplotlib-in-python#_=_">https://stackoverflow.com/questions/30553585/graphing-a-parabola-using-matplotlib-in-python#<em>=</em></a></p>
  
  <pre><code>def quadratic (a, b, c):
  try:
      d = b**2-4*a*c
      convex_point = -b/(2*a)
      if(d == 0):
          convex_point = -b/(2*a) #it is the x-interceptor when det is 0 
          print('the convex point is at',convex_point, 'on the x-axis | the parabola intersect the y-axis at',c, '| the determinant is 0');
      elif(d &lt; 0):
          print('Determinant is', d,'and if determinant is smaller than zero, there is no real solution');
      else:
          x_positive = (-b+ math.sqrt(d))/(2*a); # y = 0
          x_negative = (-b- math.sqrt(d))/(2*a); # y = 0
          print('the convex points is at',convex_point, 'on the x-axis |x_positive',x_positive,' |x_negative',x_negative,'| the parabola intersect the y-axis at',c)
  
  
  except:
      print('try: import math');
  </code></pre>