In python 3:
import math
def quadratic(a, b, c):
if (b ** 2) - (4 * a * c) < 0:
return "No"
root1 = round((-b + (math.sqrt((b ** 2) - (4 * a * c)))) / (2 * a), 2)
root2 = round((-b - (math.sqrt((b ** 2) - (4 * a * c)))) / (2 * a), 2)
lst = ([])
lst.append(root1)
lst.append(root2)
lst.sort()
return f"Yes {lst[0]}, {lst[1]}"
print(quadratic(1, 3, 2))
The print statement tests the function. I hope this helps!