Roots of a quadratic equation
This Program name is Roots of a quadratic equation. Write a Python program to Roots of a quadratic equation, it has two test cases
The below link contains Roots of a quadratic equation question, explanation and test cases
https://docs.google.com/document/d/1Wz9yIZ4GQON9tJEmSTAbcMunwn95k5PB/edit?usp=sharing&ouid=104486799211107564921&rtpof=true&sd=true
We need exact output when the code was run
a = int(input('a = '))
b = int(input('b = '))
c = int(input('c = '))
r1 = (-b + (b**2 - 4*a*c)**0.5)/2*a
r2 = (-b - (b**2 - 4*a*c)**0.5)/2*a
print(r1, r2, sep='\n')
Comments
Thankyou
Leave a comment