mirror of
https://github.com/DeaDvey/mathgenerator.git
synced 2025-11-28 14:35:23 +01:00
Fixed error with second term of problem
This commit is contained in:
@@ -254,10 +254,14 @@ def factoringFunc(range_x1 = 10, range_x2 = 10):
|
|||||||
b = intParser(x1 + x2)
|
b = intParser(x1 + x2)
|
||||||
c = intParser(x1 * x2)
|
c = intParser(x1 * x2)
|
||||||
|
|
||||||
if (b == ""):
|
if (b == "+1"):
|
||||||
b = "+"
|
b = "+"
|
||||||
|
|
||||||
|
if (b == ""):
|
||||||
|
problem = f"x^2{c}"
|
||||||
|
else:
|
||||||
problem = f"x^2{b}x{c}"
|
problem = f"x^2{b}x{c}"
|
||||||
|
|
||||||
x1 = intParser(x1)
|
x1 = intParser(x1)
|
||||||
x2 = intParser(x2)
|
x2 = intParser(x2)
|
||||||
solution = f"(x{x1})(x{x2})"
|
solution = f"(x{x1})(x{x2})"
|
||||||
|
|||||||
Reference in New Issue
Block a user