
Alvin Z. answered 01/22/23
Undergrad in ECE & Robotics with TA experience
Dhanu P.
asked 11/30/22Implement the quadratic_formula() function. The function takes 3 arguments, a, b, and c, and computes the two results of the quadratic formula
The quadratic_formula() function returns the tuple (x1, x2)
. Ex: When a = 1, b = -5, and c = 6, quadratic_formula() returns (3, 2)
.
Code provided in main.py reads a single input line containing values for a, b, and c, separated by spaces. Each input is converted to a float and passed to the quadratic_formula() function.
Ex: If the input is:
the output is:
Alvin Z. answered 01/22/23
Undergrad in ECE & Robotics with TA experience
Get a free answer to a quick problem.
Most questions answered within 4 hours.
Choose an expert and meet online. No packages or subscriptions, pay only for the time you need.