This commit is contained in:
lukew3
2020-12-17 19:47:46 -05:00
parent 08e5acd554
commit 8e2bd991ca

View File

@@ -24,20 +24,22 @@ def expandingFunc(range_x1=10, range_x2=10, range_a=10, range_b=10):
p3 = intParser(b) p3 = intParser(b)
p4 = intParser(x2) p4 = intParser(x2)
if p1 == "+1": if p1 == "+1":
p1 = "" p1 = ""
if p1[0] == "+": elif len(p1) > 0 and p1[0] == "+":
p1 = p1[1:] p1 = p1[1:]
if p3 == "+1": if p3 == "+1":
p3 = "" p3 = ""
if p3 == "+": elif p3 == "+":
p3 = p3[1:] p3 = p3[1:]
problem = f"({p1}x{p2})({p3}x{p4})" problem = f"({p1}x{p2})({p3}x{p4})"
if c1 == "+1": if c1 == "+1":
c1 = "" c1 = ""
if c1[0] == "+": elif len(c1) > 0 and c1[0] == "+":
c1 = c1[1:] # Cuts off the plus for readability c1 = c1[1:] # Cuts off the plus for readability
if c2 == "+1": if c2 == "+1":
c2 = "" c2 = ""
solution = f"{c1}*x^2{c2}*x{c3}" solution = f"{c1}*x^2{c2}*x{c3}"