diff --git a/mathgenerator/funcs/definiteIntegralFunc.py b/mathgenerator/funcs/definiteIntegralFunc.py index b029ccb..b0e502c 100644 --- a/mathgenerator/funcs/definiteIntegralFunc.py +++ b/mathgenerator/funcs/definiteIntegralFunc.py @@ -12,14 +12,14 @@ def definiteIntegralFunc(max_coeff=100): b = random.randint(0, max_coeff) c = random.randint(0, max_coeff) - I = quad(integrand, 0, 1, args=(a, b, c))[0] - S = round(I, 4) + result = quad(integrand, 0, 1, args=(a, b, c))[0] + S = round(result, 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(S) return problem, solution -definiteIntegral = Generator("Definite Integral of Quadratic Equation", 110, "The definite integral within limits 0 to 1 of quadratic equation ax^2+bx+c is = ", "I", definiteIntegralFunc) +definiteIntegral = Generator("Definite Integral of Quadratic Equation", 110, "The definite integral within limits 0 to 1 of quadratic equation ax^2+bx+c is = ", "S", definiteIntegralFunc)