From 2f6c9b0eb70e0055a109f3c6200935ece6507545 Mon Sep 17 00:00:00 2001 From: helplessThor <66440538+helplessThor@users.noreply.github.com> Date: Tue, 20 Oct 2020 12:24:17 +0530 Subject: [PATCH] Update definiteIntegralFunc.py fixed presentation errors --- mathgenerator/funcs/definiteIntegralFunc.py | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/mathgenerator/funcs/definiteIntegralFunc.py b/mathgenerator/funcs/definiteIntegralFunc.py index e5631c0..b029ccb 100644 --- a/mathgenerator/funcs/definiteIntegralFunc.py +++ b/mathgenerator/funcs/definiteIntegralFunc.py @@ -6,18 +6,18 @@ from scipy.integrate import quad def definiteIntegralFunc(max_coeff=100): def integrand(x, a, b, c): - return a*x**2 + b*x + c + return a * x ** 2 + b * x + c a = random.randint(0, max_coeff) b = random.randint(0, max_coeff) c = random.randint(0, max_coeff) I = quad(integrand, 0, 1, args=(a, b, c))[0] - I = round(I, 4) + S = round(I, 4) - problem = "The definite integral within limits 0 to 1 of the equation "+ str(a) +"x^2 + "+ str(b) +"x + "+ str(c) +" is = " + problem = "The definite integral within limits 0 to 1 of the equation " + str(a) + "x^2 + "+ str(b) +"x + " + str(c) + " is = " - solution = str(I) + solution = str(S) return problem, solution