mirror of
https://github.com/DeaDvey/mathgenerator.git
synced 2025-11-28 14:35:23 +01:00
Update definiteIntegralFunc.py
fixed presentation error
This commit is contained in:
@@ -12,8 +12,8 @@ def definiteIntegralFunc(max_coeff=100):
|
|||||||
b = random.randint(0, max_coeff)
|
b = random.randint(0, max_coeff)
|
||||||
c = random.randint(0, max_coeff)
|
c = random.randint(0, max_coeff)
|
||||||
|
|
||||||
I = quad(integrand, 0, 1, args=(a, b, c))[0]
|
result = quad(integrand, 0, 1, args=(a, b, c))[0]
|
||||||
S = round(I, 4)
|
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 = "
|
||||||
|
|
||||||
@@ -22,4 +22,4 @@ def definiteIntegralFunc(max_coeff=100):
|
|||||||
return problem, solution
|
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)
|
||||||
|
|||||||
Reference in New Issue
Block a user