Search
 
SCRIPT & CODE EXAMPLE
 
CODE EXAMPLE FOR PYTHON

python code for quadratic equation

from math import sqrt

def quadratic(a, b, c):
    x1 = -b / (2*a)
    x2 = sqrt(b**2 - 4*a*c) / (2*a)
    return (x1 + x2), (x1 - x2)
Source by treyhunner.com #
 
PREVIOUS NEXT
Tagged: #python #code #quadratic #equation
ADD COMMENT
Topic
Name
9+7 =