mirror of
https://github.com/DeaDvey/mathgenerator.git
synced 2025-11-28 14:35:23 +01:00
Fix issue #333
This commit is contained in:
@@ -24,20 +24,22 @@ def expandingFunc(range_x1=10, range_x2=10, range_a=10, range_b=10):
|
||||
p3 = intParser(b)
|
||||
p4 = intParser(x2)
|
||||
|
||||
|
||||
if p1 == "+1":
|
||||
p1 = ""
|
||||
if p1[0] == "+":
|
||||
elif len(p1) > 0 and p1[0] == "+":
|
||||
p1 = p1[1:]
|
||||
if p3 == "+1":
|
||||
p3 = ""
|
||||
if p3 == "+":
|
||||
elif p3 == "+":
|
||||
p3 = p3[1:]
|
||||
problem = f"({p1}x{p2})({p3}x{p4})"
|
||||
|
||||
if c1 == "+1":
|
||||
c1 = ""
|
||||
if c1[0] == "+":
|
||||
elif len(c1) > 0 and c1[0] == "+":
|
||||
c1 = c1[1:] # Cuts off the plus for readability
|
||||
|
||||
if c2 == "+1":
|
||||
c2 = ""
|
||||
solution = f"{c1}*x^2{c2}*x{c3}"
|
||||
|
||||
Reference in New Issue
Block a user