From e2bbbee7c6957ac6276c9b95dad579fcc93745ac Mon Sep 17 00:00:00 2001 From: Luke Weiler Date: Sat, 17 Oct 2020 12:54:30 -0400 Subject: [PATCH] Rounded solution --- mathgenerator/mathgen.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/mathgenerator/mathgen.py b/mathgenerator/mathgen.py index 3a44119..72eb108 100644 --- a/mathgenerator/mathgen.py +++ b/mathgenerator/mathgen.py @@ -723,7 +723,7 @@ def quadraticEquation(maxVal=100): D = math.sqrt(b*b-4*a*c) - solution = str([(-b+D)/(2*a),(-b-D)/(2*a)]) + solution = str([round((-b+D)/(2*a), 2),round((-b-D)/(2*a), 2)]) return problem,solution # || Class Instances