Quadratic Equation Program in Python

Quadratic Equation Program in Python


Code:

import math
a=5
b=30
c=1
xa= -b+math.sqrt(b**2-4*a*c)/2*a
xb= -b-math.sqrt(b**2-4*a*c)/2*a
print("xa is", xa)
print("xb is", xb)







Output:

xa is 44.16198487095663
xb is -104.16198487095663

>>> 



Video Tutorial:





Post a Comment

Previous Post Next Post