\textsf{Distribute.}

\textsf{Take the opposite of both sides.}

\textsf{Simplify.}

=

=

=

=

=

=

=

=

=

=

=

=

=

=

=

=

=

=

=

=

=

=

=

=

=

=

=

=

=

=

=

=

=

=

$\textsf{Alternative Solution}$

=

=

=

x

#DA2570

#3A6ED6

#006758

#4D4D4D

$\text{Check}$

$\text{NEW PROBLEM}$

Fix position and allow selection for all text objects

Empty all input boxes

$b=$

Reset app

\text{This is the error specific hint}

#B00020

#252525

#757575

#949494

#E44461

#DA2570

#E66B9E

#3A6ED6

#5991FF

#008475

#0F8538

#00a83c

#5145A8

#6557D2

#8575FF

#903D14

#BD6C43

#C75000

#E07415

#eeeeee

#2E006758

#2EB00020

\text{Drag to start}

$a=\vphantom{b}$

\text{Describe the applet here}

$\text{Some string input}$

\text{Use the dropdown menu to choose the steps to solve the equation: } 

=

\hspace{200}

\hspace{100}

=

F4

F5D

=

F6D

=

F7D

=

F8D

=

F5ND

=

F6ND

=

F7ND

F8ND

=

$\textsf{NEW EQUATION}$

$\math{a=}$

$\textsf{APPLY}$

Undo

$\textsf{APPLY}$

D17: distText_{1}
D26: D17
D35: D26
D44: D35
D56: simpText_{1}
D63: D56
D70: D63
D77: D70
D54: simpText_{1}
D61: D54
D68: D61
D75: D68
D22: simpText_{1}
D31: D22
D40: D31
D49: D40
D20: simpText_{1}
D29: D20
D38: D29
D47: D38
D18: simpText_{1}
D27: D18
D36: D27
D45: D36
D4: simpText_{1}
D11: D4
P12 = (5, -5)
P11 = (5, -4)
P10 = (5, -1)
P9 = (5, -1)
P8 = (5, 0)
P7 = (5, -2)
P6 = (0, -5)
P5 = (0, -4)
P4 = (0, -1)
P3 = (0, 0)
B70: B63
B69: B62
B68: B61
B67: B60
B31: B22
B30: B21
B29: B20
B28: B19
B27: B18
altSol_{1} = false
nsl = 1 (slider from 1 to maxSL_{1} - 1, step 1)
randomFormat_{1} = Sequence(12)
randomSol = Flatten({Sequence[-15, 15], Sequence[((2 * ii) + 1) / 2, ii, -5, 5], Sequence[((3 * ii) + 1) / 3, ii, -2, 2], Sequence[((3 * ii) + 2) / 3, ii, -2, 2], Sequence[((4 * ii) + 1) / 4, ii, -1, 2], Sequence[((4 * ii) + 3) / 4, ii, -1, 1], Sequence[((5 * ii) + 1) / 5, ii, -1, 1]})
countQuestion = 0
countQuestion_{1}: countQuestion
numRandoms: 12
allRandomSeeds = RandomUniform(0, 0.99, 200)
randIndex: (Mod[countQuestion, floor(Length[allRandomSeeds] / numRandoms)] * numRandoms) + 1
currentRandomSeeds = Take(allRandomSeeds, randIndex, randIndex + numRandoms - 1)
format = If(countQuestion ≟ 0, 1, Element[randomFormat_{1}, floor((currentRandomSeeds(6) * Length[randomFormat_{1}])) + 1])
solution = If(countQuestion ≟ 0, 6, Element[randomSol, 1 + floor((currentRandomSeeds(1) * Length[randomSol]))])
randomP2 = KeepIf(IsInteger[(jj * solution)], jj, Sequence[15] \ {1})
p2 = If(countQuestion ≟ 0, 13, (Element[randomP2, floor((currentRandomSeeds(3) * Length[randomP2])) + 1] * (-1)^(countQuestion_{1})))
randomQ2: Sequence[-5, 5] \ {0, (-solution)}
q2 = If(countQuestion ≟ 0, 15, Element[randomQ2, floor((currentRandomSeeds(5) * Length[randomQ2])) + 1])
r2: (solution * p2) + (q2 * p2)
distribute_{1}: false
randomP1 = KeepIf(IsInteger[(jj * solution)] ∧ abs((jj * solution)) ≤ 15, jj, Sequence[-10, 10] \ {0, 1})
p1 = If(countQuestion ≟ 0, -1, Element[randomP1, floor((currentRandomSeeds(2) * Length[randomP1])) + 1])
maxSL_{1}: If[format ≤ 4, If[p1 ≟ -1, 4, 6], If[distribute_{1}, 8, 6]] + 1
n_{1}: maxSL_{1} - nsl
A22: (If[n_{1} ≟ 8, "{", "{"] * "x}")
A31: A22
A40: A31
A49: A40
A63: A56
A70: A63
A77: A70
P1 = (0, -2)
P2 = (0, -1)
C56: ((If[n_{1} ≟ 5, (("\color{" * colorHL_{1}) * "}"), ""] * If[solution ≥ 0, "", "-"]) * FractionText[abs(solution)])
C63: C56
C70: C63
C77: C70
C22: "\color{" + (LaTeX[If[n_{1} ≟ 7, colorHL_{1}, "tealSuccess"]]) + "}" + (LaTeX[If[solution ≥ 0, "", "-"]]) + "" + (LaTeX[FractionText[abs(solution)]]) + ""
C31: C22
C40: C31
C49: C40
divideP2Text_{1}: "\textsf{" + (LaTeX[If[n_{1} ≟ 2, (("\bold\textcolor{" * colorHL_{1}) * "}{"), "{"]]) + "Divide} both sides of the equation by \(" + (LaTeX[(If[n_{1} ≟ 2, (("\bold\color{" * colorHL_{1}) * "}"), ""] * p2)]) + "\).}"
D53: divideP2Text_{1}
D60: D53
D67: D60
D74: D67
D21: "\textsf{" + (LaTeX[If[n_{1} ≟ 6, (("\bold\textcolor{" * colorHL_{1}) * "}"), ""]]) + "{Divide} both sides of the equation by " + (LaTeX[If[n_{1} ≟ 6, (("\bold\textcolor{" * colorHL_{1}) * "}{{}"), "{"]]) + "\(" + (LaTeX[p2]) + "\)}.}"
D30: D21
D39: D30
D48: D39
A21: "\dfrac{" + (LaTeX[If[n_{1} ≟ 7, (("\bold\textcolor{" * colorCancel_{1}) * "}{"), "{"]]) + "" + (LaTeX[p2]) + "}x}{" + (LaTeX[If[n_{1} ≟ 6, (("\bold\textcolor{" * colorHL_{1}) * "}{"), n_{1} ≟ 7, (("\bold\textcolor{" * colorCancel_{1}) * "}{"), "{"]]) + "" + (LaTeX[p2]) + "}}"
A30: A21
A39: A30
A48: A39
A38: (p2 * "x")
A47: A38
A20: (p2 * "x")
A29: A20
D55: "\textsf{" + (LaTeX[If[n_{1} ≟ 4, (("\bold\textcolor{" * colorHL_{1}) * "}{"), "{"]]) + "" + (LaTeX[If[q2 ≥ 0, "Subtract ", "Add "]]) + "" + (LaTeX[abs(q2)]) + "}" + (LaTeX[If[q2 ≥ 0, " from ", " to "]]) + "both sides of the equation.}"
just5ND: {D53, D54, D55, D56}
D62: D55
just6ND: {D60, D61, D62, D63}
D69: D62
just7ND: {D67, D68, D69, D70}
D76: D69
just8ND: {D74, D75, D76, D77}
D19: "\textsf{" + (LaTeX[If[n_{1} ≟ 4, (("\bold\textcolor{" * colorHL_{1}) * "}{"), ""]]) + "" + (LaTeX[If[(p2 * q2) ≥ 0, "Subtract ", "Add "]]) + "" + (LaTeX[abs((p2 * q2))]) + "" + (LaTeX[If[n_{1} ≟ 4, "}", ""]]) + "" + (LaTeX[If[(p2 * q2) ≥ 0, " from ", " to "]]) + "both sides of the equation.}"
just5D: {D17, D18, D19, D20, D21, D22}
D28: D19
just6D: {D26, D27, D28, D29, D30, D31}
D37: D28
just7D: {D35, D36, D37, D38, D39, D40}
D46: D37
just8D: {D44, D45, D46, D47, D48, D49}
A74: "\frac{(" + (LaTeX[q2]) + "+x)\cdot" + (LaTeX[If[n_{1} ≟ 3, (("\bold\textcolor{" * colorCancel_{1}) * "}{"), "{"]]) + "" + (LaTeX[If[p2 ≤ 0, (("(" * p2) * ")"), Text[p2]]]) + "}}{" + (LaTeX[If[n_{1} ≟ 2, (("\bold\color{" * colorHL_{1}) * "}"), n_{1} ≟ 3, (("\bold\color{" * colorCancel_{1}) * "}"), ""]]) + "" + (LaTeX[p2]) + "}"
A69: "" + (LaTeX[(If[n_{1} ≟ 5, (("\bold\textcolor{" * colorCancel_{1}) * "}{{}"), "{"] * q2)]) + "}+x" + (LaTeX[If[n_{1} ≟ 4, (("\bold\textcolor{" * colorHL_{1}) * "}{{}"), n_{1} ≟ 5, (("\bold\textcolor{" * colorCancel_{1}) * "}{{}"), "{"]]) + "" + (LaTeX[If[q2 ≥ 0, "-", "+"]]) + "" + (LaTeX[abs(q2)]) + "}"
A76: A69
A67: "\frac{" + (LaTeX[If[n_{1} ≟ 3, (("\bold\textcolor{" * colorCancel_{1}) * "}{{}"), "{"]]) + "" + (LaTeX[p2]) + "(" + (LaTeX[q2]) + "+x)}}{" + (LaTeX[If[n_{1} ≟ 2, (("\bold\textcolor{" * colorHL_{1}) * "}{{}"), n_{1} ≟ 3, (("\bold\textcolor{" * colorCancel_{1}) * "}{{}"), "{"]]) + "" + (LaTeX[p2]) + "}}"
A60: "\frac{ (x" + (LaTeX[If[q2 ≥ 0, "+", "-"]]) + "" + (LaTeX[abs(q2)]) + ")\cdot" + (LaTeX[If[n_{1} ≟ 3, (("\bold\textcolor{" * colorCancel_{1}) * "}{{}"), "{"]]) + "" + (LaTeX[If[p2 ≥ 0, "", "("]]) + "" + (LaTeX[p2]) + "" + (LaTeX[If[p2 ≥ 0, "", ")"]]) + "}}{" + (LaTeX[If[n_{1} ≟ 2, (("\bold\textcolor{" * colorHL_{1}) * "}{"), n_{1} ≟ 3, (("\bold\textcolor{" * colorCancel_{1}) * "}{"), "{"]]) + "" + (LaTeX[p2]) + "}}"
A55: "x" + (LaTeX[If[n_{1} ≟ 5, (("\bold\textcolor{" * colorCancel_{1}) * "}{{}"), "{"]]) + "" + (LaTeX[If[q2 ≥ 0, "+", ""]]) + "" + (LaTeX[Text[q2]]) + "}" + (LaTeX[If[n_{1} ≟ 4, (("\bold\textcolor{" * colorHL_{1}) * "}{{}"), n_{1} ≟ 5, (("\bold\textcolor{" * colorCancel_{1}) * "}{{}"), "{"]]) + "" + (LaTeX[If[q2 ≥ 0, "-", "+"]]) + "" + (LaTeX[abs(q2)]) + "}"
A62: A55
A53: "\frac{" + (LaTeX[If[n_{1} ≟ 3, (("\bold\textcolor{" * colorCancel_{1}) * "}{{}"), "{"]]) + "" + (LaTeX[p2]) + "}(x" + (LaTeX[(If[q2 ≥ 0, "+", "-"] * abs(q2))]) + ")}{" + (LaTeX[If[n_{1} ≟ 2, (("\bold\textcolor{" * colorHL_{1}) * "}{{}"), n_{1} ≟ 3, (("\bold\textcolor{" * colorCancel_{1}) * "}{{}"), "{"]]) + "" + (LaTeX[p2]) + "}}"
A44: "" + (LaTeX[(If[n_{1} ≟ 3, (("\bold\textcolor{" * colorHL_{1}) * "}{{}"), "{"] * q2)]) + "}\cdot" + (LaTeX[If[n_{1} ≤ 3, (("\bold\textcolor{" * colorHL_{1}) * "}{{}"), "{"]]) + "" + (LaTeX[If[p2 ≥ 0, Text[p2], (("(" * Text[p2]) * ")")]]) + "} + x \cdot" + (LaTeX[If[n_{1} ≟ 2, (("\bold\textcolor{" * colorHL_{1}) * "}{{}"), "{"]]) + "" + (LaTeX[If[p2 ≥ 0, Text[p2], (("(" * Text[p2]) * ")")]]) + "}"
A37: "" + (LaTeX[(If[n_{1} ≟ 5, (("\bold\textcolor{" * colorCancel_{1}) * "}{{}"), "{"] * Text[(p2 * q2)])]) + "}" + (LaTeX[If[p2 ≥ 0, "+", ""]]) + "" + (LaTeX[Text[p2]]) + "x" + (LaTeX[If[n_{1} ≟ 4, (("\bold\textcolor{" * colorHL_{1}) * "}{{}"), n_{1} ≟ 5, (("\bold\textcolor{" * colorCancel_{1}) * "}{{}"), "{"]]) + "" + (LaTeX[If[(p2 * q2) ≥ 0, "-", "+"]]) + "" + (LaTeX[Text[abs((p2 * q2))]]) + "}"
A46: A37
A36: "" + (LaTeX[If[n_{1} ≟ 3, (("\bold\textcolor{" * colorHL_{1}) * "}{{}"), ""]]) + "" + (LaTeX[(Text[(p2 * q2)] * If[n_{1} ≟ 3, "}", ""])]) + "" + (LaTeX[If[p2 ≥ 0, "+", ""]]) + "" + (LaTeX[Text[p2]]) + "x"
A45: A36
A35: "" + (LaTeX[(If[n_{1} ≤ 3, (("\bold\textcolor{" * colorHL_{1}) * "}{{}"), "{"] * p2)]) + "" + (LaTeX[If[n_{1} ≟ 2, "}", ""]]) + "\cdot " + (LaTeX[(If[q2 ≥ 0, Text[q2], (("(" * Text[q2]) * ")")] * If[n_{1} ≥ 3, "}", ""])]) + "" + (LaTeX[If[n_{1} ≟ 2, (("\bold\textcolor{" * colorHL_{1}) * "}{{}"), "{"]]) + "" + (LaTeX[If[p2 ≥ 0, "+", ""]]) + "" + (LaTeX[Text[p2]]) + "}x"
A26: "x \cdot" + (LaTeX[If[n_{1} ≟ 2, (("\bold\textcolor{" * colorHL_{1}) * "}{{}"), "{"]]) + "" + (LaTeX[If[p2 ≥ 0, Text[p2], (("(" * Text[p2]) * ")")]]) + "}" + (LaTeX[If[n_{1} ≟ 3, (("\bold\textcolor{" * colorHL_{1}) * "}{{}"), "{"]]) + "" + (LaTeX[If[q2 ≥ 0, "+", ""]]) + "" + (LaTeX[Text[q2]]) + "}\cdot" + (LaTeX[If[n_{1} ≤ 3, (("\bold\textcolor{" * colorHL_{1}) * "}{{}"), "{"]]) + "" + (LaTeX[If[p2 ≥ 0, Text[p2], (("(" * Text[p2]) * ")")]]) + "}"
A19: "" + (LaTeX[p2]) + "x" + (LaTeX[If[(p2 * q2) ≥ 0, "+", ""]]) + "" + (LaTeX[If[n_{1} ≟ 5, (("\bold\textcolor{" * colorCancel_{1}) * "}{{}"), ""]]) + "" + (LaTeX[Text[(p2 * q2)]]) + "" + (LaTeX[If[n_{1} ≟ 5, "}", ""]]) + "" + (LaTeX[If[n_{1} ≟ 4, (("\bold\textcolor{" * colorHL_{1}) * "}{{}"), n_{1} ≟ 5, (("\bold\textcolor{" * colorCancel_{1}) * "}{{}"), ""]]) + "" + (LaTeX[If[(p2 * q2) ≥ 0, "-", "+"]]) + "" + (LaTeX[abs((p2 * q2))]) + "" + (LaTeX[If[4 ≤ n_{1} ≤ 5, "}", ""]]) + ""
A28: A19
A18: "" + (LaTeX[p2]) + "x" + (LaTeX[If[(p2 * q2) ≥ 0, "+", ""]]) + "" + (LaTeX[If[n_{1} ≟ 3, (("\bold\textcolor{" * colorHL_{1}) * "}{{}"), ""]]) + "" + (LaTeX[Text[(p2 * q2)]]) + "" + (LaTeX[If[n_{1} ≟ 3, "}", ""]]) + ""
A27: A18
A17: "" + (LaTeX[(If[n_{1} ≟ 2, (("\bold\textcolor{" * colorHL_{1}) * "}{"), ""] * p2)]) + "" + (LaTeX[If[n_{1} ≟ 2, "}", ""]]) + "x" + (LaTeX[If[2 ≤ n_{1} ≤ 3, (("\bold\textcolor{" * colorHL_{1}) * "}{{}"), ""]]) + "" + (LaTeX[If[p2 ≥ 0, "+", ""]]) + "" + (LaTeX[p2]) + "" + (LaTeX[If[n_{1} ≟ 2, "}", ""]]) + "\cdot" + (LaTeX[If[q2 ≤ 0, "(", ""]]) + "" + (LaTeX[q2]) + "" + (LaTeX[If[q2 ≤ 0, ")", ""]]) + "" + (LaTeX[If[n_{1} ≟ 3, "}", ""]]) + ""
C54: (If[n_{1} ≟ 3, (("\bold\color{" * colorHL_{1}) * "}"), ""] * FractionText[r2 / p2])
C61: C54
C68: C61
C75: C68
C55: "" + (LaTeX[(((((If[n_{1} ≟ 5, (("\bold\textcolor{" * colorHL_{1}) * "}{{}"), "{"] * C54) * "}") * If[n_{1} ≟ 4, (("\bold\textcolor{" * colorHL_{1}) * "}{{}"), n_{1} ≟ 5, (("\bold\textcolor{" * colorHL_{1}) * "}{{}"), "{"]) * If[q2 ≥ 0, "-", "+"]) * abs(q2))]) + "}"
C62: C55
C69: C62
C76: C69
C20: "" + (LaTeX[(If[n_{1} ≟ 5, (("\bold\color{" * colorHL_{1}) * "}"), ""] * Text[r2 - (p2 * q2)])]) + ""
C29: C20
C38: C29
C47: C38
C21: "\dfrac{" + (LaTeX[If[n_{1} ≟ 7, (("\bold\textcolor{" * colorHL_{1}) * "}{"), "{"]]) + "" + (LaTeX[C20]) + "}}{" + (LaTeX[If[6 ≤ n_{1} ≤ 7, (("\bold\textcolor{" * colorHL_{1}) * "}{"), "{"]]) + "" + (LaTeX[p2]) + "}}"
C30: C21
C39: C30
C48: C39
C52 = Text(r2)
C53: "\frac{" + (LaTeX[If[n_{1} ≟ 3, (("\bold\textcolor{" * colorHL_{1}) * "}{"), "{"]]) + "" + (LaTeX[C52]) + "}}{" + (LaTeX[If[n_{1} ≤ 3, (("\bold\textcolor{" * colorHL_{1}) * "}{"), "{"]]) + "" + (LaTeX[p2]) + "}}"
C60: C53
C67: C60
C74: C67
C16 = Text(r2)
C17: C16
C26: C17
C35: C26
C44: C35
C18: C17
C19: "" + (LaTeX[((If[n_{1} ≟ 5, (("\bold\textcolor{" * colorHL_{1}) * "}{{}"), ""] * C18) * If[n_{1} ≟ 5, "}", ""])]) + "" + (LaTeX[If[4 ≤ n_{1} ≤ 5, (("\bold\textcolor{" * colorHL_{1}) * "}{{}"), ""]]) + "" + (LaTeX[(If[(p2 * q2) ≥ 0, "-", "+"] * abs((p2 * q2)))]) + "" + (LaTeX[If[4 ≤ n_{1} ≤ 5, "}", ""]]) + ""
eq5D: {{A17, B17, C17}, {A18, B18, C18}, {A19, B19, C19}, {A20, B20, C20}, {A21, B21, C21}, {A22, B22, C22}}
eq9D = Zip(Reverse[LL], LL, eq5D)
C28: C19
C37: C28
C46: C37
C27: C18
eq6D: {{A26, B26, C26}, {A27, B27, C27}, {A28, B28, C28}, {A29, B29, C29}, {A30, B30, C30}, {A31, B31, C31}}
C36: C27
eq7D: {{A35, B35, C35}, {A36, B36, C36}, {A37, B37, C37}, {A38, B38, C38}, {A39, B39, C39}, {A40, B40, C40}}
eq11D = Zip(Reverse[LL], LL, eq7D)
C45: C36
eq8D: {{A44, B44, C44}, {A45, B45, C45}, {A46, B46, C46}, {A47, B47, C47}, {A48, B48, C48}, {A49, B49, C49}}
eq12D = Zip(Reverse[LL], LL, eq8D)
A68: (q2 * "+x")
eq7ND: {{A67, B67, C67}, {A68, B68, C68}, {A69, B69, C69}, {A70, B70, C70}}
eq11ND = Zip(Reverse[LL], LL, eq7ND)
A75: A68
eq8ND: {{A74, B74, C74}, {A75, B75, C75}, {A76, B76, C76}, {A77, B77, C77}}
eq12ND = Zip(Reverse[LL], LL, eq8ND)
A54: (("x" * If[q2 ≥ 0, "+", ""]) * Text[q2])
eq5ND: {{A53, B53, C53}, {A54, B54, C54}, {A55, B55, C55}, {A56, B56, C56}}
eq9ND = Zip(Reverse[LL], LL, eq5ND)
A61: A54
eq6ND: {{A60, B60, C60}, {A61, B61, C61}, {A62, B62, C62}, {A63, B63, C63}}
D5 = If(p1 ≟ -1, oppositeText_{1}, ((((((("\textsf{" * If[n_{1} ≟ 4, (("\bold\textcolor{" * colorHL_{1}) * "}{"), ""]) * "Divide") * If[n_{1} ≟ 4, "}", ""]) * " both sides of the equation by \(") * If[n_{1} ≟ 4, (("\bold\color{" * colorHL_{1}) * "}"), ""]) * p1) * "\).}"))
D12: D5
D6 = If(p1 ≠ -1, simpText_{1}, "")
D13: D6
C6 = If(p1 ≠ -1, (((("\color{" * If[n_{1} ≟ 5, colorHL_{1}, "tealSuccess"]) * "}") * If[solution ≥ 0, "", "-"]) * FractionText[abs(solution)]), "")
A13: C6
text3_{1}: "\dfrac{" + (LaTeX[((If[n_{1} ≟ 5, (("\bold\textcolor{" * colorCancel_{1}) * "}{"), ""] * p1) * If[n_{1} ≟ 5, "}", ""])]) + "x}{" + (LaTeX[((If[n_{1} ≟ 5, (("\bold\textcolor{" * colorCancel_{1}) * "}{"), n_{1} ≟ 4, ((("\bold\textcolor{" * colorHL_{1}) * "}{") * "")] * p1) * If[4 ≤ n_{1} ≤ 5, "}", ""])]) + "}"
A5: "" + (LaTeX[If[p1 ≟ -1, "{x}", text3_{1}]]) + ""
C12: A5
A6 = If(p1 ≠ -1, "x", "")
C13: A6
B6 = If(p1 ≠ -1, "=", "")
B13: B6
A4: (If[p1 ≟ -1, "-", Text[p1]] * "x")
C11: A4
randomQ1 = KeepIf(0 < abs((solution * p1) + qq) ≤ 16, qq, Sequence[-15, 15] \ {0})
q1 = If(countQuestion ≟ 1, -1, Element[randomQ1, floor((currentRandomSeeds(4) * Length[randomQ1])) + 1])
justif2LessThan_{1}: "\textsf{" + (LaTeX[((((((("\textcolor{" * If[n_{1} ≟ 2, colorHL_{1}, colorTealSuccess]) * "}") * If[n_{1} ≟ 2, "\bold{", "{"]) * If[q1 ≤ 0, "Add ", "Subtract "]) * abs(q1)) * "}") * If[q1 ≤ 0, " to", " from"])]) + " both sides of the equation.}"
D3: justif2LessThan_{1}
just1: {D3, D4, D5, D6}
D10: D3
just2: {D10, D11, D12, D13}
just = Element(Join[{{just1, just2, just1, just2}, If[distribute_{1}, {just5D, just6D, just7D, just8D, just5D, just6D, just7D, just8D}, {just5ND, just6ND, just7ND, just8ND, just5ND, just6ND, just7ND, just8ND}]}], format)
C10: "" + (LaTeX[If[n_{1} ≟ 3, (("\bold\textcolor{" * colorCancel_{1}) * "}{"), ""]]) + "" + (LaTeX[q1]) + "" + (LaTeX[If[n_{1} ≟ 3, "}", ""]]) + "" + (LaTeX[If[p1 ≟ -1, "-", If[p1 ≥ 0, ("+" * p1), Text[p1]]]]) + "x" + (LaTeX[If[n_{1} ≟ 2, (("\bold\textcolor{" * colorHL_{1}) * "}{{}"), n_{1} ≟ 3, (("\bold\textcolor{" * colorCancel_{1}) * "}{{}"), ""]]) + "" + (LaTeX[(If[q1 ≥ 0, ("-" * q1), ("+" * abs(q1))] * If[2 ≤ n_{1} ≤ 3, "}", ""])]) + ""
A3: "\math{\(" + (LaTeX[If[p1 ≟ -1, "-", Text[p1]]]) + "x" + (LaTeX[If[n_{1} ≟ 3, (("\bold\textcolor{" * colorCancel_{1}) * "}{{}"), ""]]) + "" + (LaTeX[If[q1 ≥ 0, "+", ""]]) + "" + (LaTeX[q1]) + "" + (LaTeX[If[n_{1} ≟ 3, "}", ""]]) + "" + (LaTeX[If[n_{1} ≟ 3, (("\bold\textcolor{" * colorCancel_{1}) * "}{{}"), n_{1} ≟ 2, (("\bold\textcolor{" * colorHL_{1}) * "}{{}"), ""]]) + "" + (LaTeX[If[q1 ≥ 0, ("-" * q1), ("+" * abs(q1))]]) + "" + (LaTeX[If[2 ≤ n_{1} ≤ 3, "}", ""]]) + "\)}"
r1: (solution * p1) + q1
C5 = If(p1 ≟ -1, (("{" * Text[(-r1) + q1]) * "}"), (((((((("\dfrac{" * If[n_{1} ≟ 5, (("\textcolor{" * colorHL_{1}) * "}{"), ""]) * Text[r1 - q1]) * If[n_{1} ≟ 5, "}", ""]) * "}{") * If[4 ≤ n_{1} ≤ 5, (("\textcolor{" * colorHL_{1}) * "}{"), ""]) * p1) * If[4 ≤ n_{1} ≤ 5, "}", ""]) * "}"))
A12: C5
C4: ((If[n_{1} ≟ 3, (("\bold\textcolor{" * colorHL_{1}) * "}{"), ""] * Text[r1 - q1]) * If[n_{1} ≟ 3, "}", ""])
A11: C4
C3: "" + (LaTeX[If[n_{1} ≟ 3, (("\bold\textcolor{" * colorHL_{1}) * "}{"), ""]]) + "" + (LaTeX[Text[r1]]) + "" + (LaTeX[If[n_{1} ≟ 3, "}", ""]]) + "" + (LaTeX[If[2 ≤ n_{1} ≤ 3, (("\bold\textcolor{" * colorHL_{1}) * "}{{}"), ""]]) + "" + (LaTeX[If[q1 ≥ 0, ("-" * q1), ("+" * abs(q1))]]) + "" + (LaTeX[If[2 ≤ n_{1} ≤ 3, "}", ""]]) + ""
eq1 = Take({{A3, B3, C3}, {A4, B4, C4}, {A5, B5, C5}, {A6, B6, C6}}, 1, If[p1 ≟ -1, 3, 4])
eq3 = Zip(Reverse[LL], LL, eq1)
A10: C3
eq4 = Take({{A10, B10, C10}, {A11, B11, C11}, {A12, B12, C12}, {A13, B13, C13}}, 1, If[p1 ≠ -1, 4, 3])
eq2 = Zip(Reverse[LL], LL, eq4)
eqs = Element(Join[{{eq1, eq2, eq3, eq4}, If[distribute_{1}, {eq5D, eq6D, eq7D, eq8D, eq9D, eq11D, eq11D, eq12D}, {eq5ND, eq6ND, eq7ND, eq8ND, eq9ND, eq11ND, eq11ND, eq12ND}]}], format)
yourSolution = true
hei = 0.8 (slider from -5 to 5)
wid = 4.5
wid2: (3 / 2 * wid)
inputSaved: {}
validA = true
validB = true
validC = true
inputA = NaN
inputB = NaN
randomNum1: 1 + floor((currentRandomSeeds(1) * 20))
onboarding = false
randomNum2: randomNum1 + 2 + floor((currentRandomSeeds(2) * 10))
validate = false
showanswer = false
showsolution = false
tries = 0
countCorrect = 0
showhint = false
InputBoxB = Textfield(inputB)
step = 1
lefts: {Polynomial[(p1 * x) + q1], q1 + Polynomial[(p1 * x)], Polynomial[(0 * x) + r1], Polynomial[(0 * x) + r1], (p2 * (x + q2)), ((x + q2) * p2), (p2 * (q2 + x)), ((q2 + x) * p2), Polynomial[(0 * x) + r2], Polynomial[(0 * x) + r2], Polynomial[(0 * x) + r2], Polynomial[(0 * x) + r2]}
left1 = Element(lefts, format)
rights: {Polynomial[(0 * x) + r1], Polynomial[(0 * x) + r1], Polynomial[(p1 * x) + q1], q1 + Polynomial[(p1 * x)], Polynomial[(0 * x) + r2], Polynomial[(0 * x) + r2], Polynomial[(0 * x) + r2], Polynomial[(0 * x) + r2], (p2 * (x + q2)), ((x + q2) * p2), (p2 * (q2 + x)), ((q2 + x) * p2)}
right1 = Element(rights, format)
left2(x) = (-x) + 12
right2(x) = 6
right3(x) = 9 + 1 - 1
left3(x) = -1 + (6 * x) + 1 - 1
right4(x) = 9
right5(x) = 2 + 2 - 1
right6(x) = ((4 + 4 - 2) * 3)
left4(x) = (6 * x) - 1
left5(x) = (-x) + 8 + 2 - 1
left6(x) = (((-x) + 10 + 4 - 2) * 3)
studJust: {""}
studSteps = Take({{LaTeX[left1], "=", LaTeX[right1], studJust(1)}, {LaTeX[left2], "=", LaTeX[right2], studJust(2)}, {LaTeX[left3], "=", LaTeX[right3], studJust(3)}, {LaTeX[left4], "=", LaTeX[right4], studJust(4)}, {LaTeX[left5], "=", LaTeX[right5], studJust(5)}, {LaTeX[left6], "=", LaTeX[right6], studJust(6)}}, 1, step)
laststep: studSteps(-1)
correct: laststep(1) ≟ "x" ∨ laststep(3) ≟ "x"
isTypicalError: inputB ≟ inputA + 1
showbuttons = true
showhinttypicalerror = false
textCountCorrect: "\text{Number correct: " + (LaTeX[countCorrect]) + " }"
pixelsRight: 16
pixelsLeft: 16
pixelsBottom: 16
pixelsTop: 24
layoutY: 448
layoutX: 194
layoutAppSize = Corner(5)
pulsingSpeed: 8
pulsing = 0.6 (slider from 0 to 1, step 0.1)
onboardingCase: 1
onboardingX: 337
onboardingY: 150
OnboardingTextOffset = onboardingTextOffset(Corner[onboardingText, 1], Corner[onboardingText, 3], onboardingCase, Corner[1], Corner[3], Corner[5])
onboardingDisplayText: "" + (LaTeX[onboardingText]) + ""
solutionView: showanswer ∨ showsolution
InputBoxA = Textfield(inputA)
InputBoxC = Textfield(inputC)
textFeedback: "\text{\vphantom{✕}" + (LaTeX[If[correct, (("\textcolor{" * colorTealSuccess) * "}{✓ Correct}"), (((("\textcolor{" * colorRedError) * "}{✕ ") * If[tries < 3, "Try again", "Maybe next time"]) * "}")]]) + "}"
maxTries: 3
labelBtnValidate: "\text{CHECK (" + (LaTeX[maxTries - tries]) + ")}"
vspace_{1}: 50
C2 = Text(r1)
A2: (((If[p1 ≟ -1, "-", Text[p1]] * "x") * If[q1 ≥ 0, "+", ""]) * q1)
E5_{1}: Numerator[solution] ≠ r1 - q1
AppSize_{1} = Corner(5)
MoveGuideLine_{1} = (10.215741232572348, -3.0529068654779286)
hGuideline_{1}: y = y(MoveGuideLine_{1})
vGuideline_{1}: x = x(MoveGuideLine_{1})
format2Pol_{1}: "" + (LaTeX[q1]) + "" + (LaTeX[If[p1 ≟ -1, "-", If[p1 ≥ 0, ("+" * abs(p1)), Text[p1]]]]) + "x"
format6Pol_{1}: "(x" + (LaTeX[(If[q2 ≥ 0, "+", "-"] * abs(q2))]) + ")\cdot" + (LaTeX[(((If[distribute_{1} ∧ n_{1} ≟ 2, (("\bold\textcolor{" * colorHL_{1}) * "}{{}"), "{"] * If[p2 ≥ 0, "", "("]) * p2) * If[p2 ≥ 0, "", ")"])]) + "}"
format7Pol_{1}: "" + (LaTeX[(If[distribute_{1} ∧ n_{1} ≟ 2, (("\bold\textcolor{" * colorHL_{1}) * "}{{}"), "{"] * If[p2 ≟ -1, "-", Text[p2]])]) + "}(" + (LaTeX[q2]) + "+x)"
format8Pol_{1}: "(" + (LaTeX[q2]) + "+x)\cdot" + (LaTeX[(((If[distribute_{1} ∧ n_{1} ≟ 2, (("\bold\textcolor{" * colorHL_{1}) * "}{{}"), "{"] * If[p2 ≥ 0, "", "("]) * p2) * If[p2 ≥ 0, "", ")"])]) + "}"
format1Pol_{1}: "" + (LaTeX[If[p1 ≟ -1, "-", Text[p1]]]) + "x" + (LaTeX[If[q1 ≥ 0, "+", ""]]) + "" + (LaTeX[q1]) + ""
A9: C2
C9: format2Pol_{1}
format5Pol_{1}: "" + (LaTeX[((If[distribute_{1} ∧ n_{1} ≟ 2, (("\bold\textcolor{" * colorHL_{1}) * "}{"), ""] * If[p2 ≟ -1, "-", Text[p2]]) * If[distribute_{1} ∧ n_{1} ≟ 2, "}", ""])]) + "(x" + (LaTeX[(If[q2 ≥ 0, "+", "-"] * abs(q2))]) + ")"
A16: format5Pol_{1}
A25: format6Pol_{1}
C25: C16
D25: D16
A34: format7Pol_{1}
C34: C25
D34: D25
A43: format8Pol_{1}
C43: C34
D43: D34
A52: format5Pol_{1}
A59: format6Pol_{1}
C59: C52
D59: D52
A66: format7Pol_{1}
B66: B59
C66: C59
D66: D59
A73: format8Pol_{1}
C73: C66
D73: D66
prevAltSol_{1} = false
f_1 = Translate(hGuideline_{1}, Vector[(Vector[Corner[1], Corner[4]] / 500 * 16)])
Cor1 = (-0.2916270637561714, -6.258627082624216)
Cor3 = (13.778395795546233, 2.548296590854593)
eq10D = Zip(Reverse[LL], LL, eq6D)
eq10ND = Zip(Reverse[LL], LL, eq6ND)
prompt1: {A2, B2, C2}
prompt3 = Reverse({A2, B2, C2})
prompt2 = Reverse({A9, B9, C9})
prompt4: {A9, B9, C9}
prompt5: {A16, B16, C16}
prompt6: {A25, B25, C25}
prompt7: {A34, B34, C34}
prompt8: {A43, B43, C43}
prompt12 = Reverse({A43, B43, C43})
prompt11 = Reverse({A34, B34, C34})
prompt10 = Reverse({A25, B25, C25})
prompt9 = Reverse({A16, B16, C16})
greenbg: {228, 210, 223, 238} / 255
labelBtnToggle: (("$\textsf{" * If[yourSolution, "SHOW SOLUTION", "YOUR SOLUTION"]) * "}$")
speedAnim = 5
nextStepTexts: {"Choose one ", "Add to both sides ", "Subtract from both sides ", "Multiply both sides ", "Divide both sides ", "Simplify "}
nextStep = Zip((("$\textsf{" * tt) * "}$"), tt, nextStepTexts)
Prompt = Element({prompt1, prompt2, prompt3, prompt4, prompt5, prompt6, prompt7, prompt8, prompt9, prompt10, prompt11, prompt12}, format)
chosenNextStep: SelectedIndex[nextStep] - 1
studNum(x) = ?
InputBox1 = Textfield(studNum)
inputCurrent = If(Length[studSteps] ≟ 1, {}, Take[studSteps, 2])
inputValid: true
enableValidate: inputCurrent ≠ inputSaved
enableInput: tries < maxTries ∧ (¬(validate ∧ correct)) ∧ step ≤ 5
text1 = TableText(studSteps, "rcll", 5, 65)
yDropDown: 56 + (step * 65)
modifyLeft = Sequence((((((((((((("SetValue(left" * kk) * ",CopyFreeObject(Element({left") * (kk - 1)) * "+studNum,left") * (kk - 1)) * "-studNum,left") * (kk - 1)) * "*studNum,left") * (kk - 1)) * "/studNum,Simplify(left") * (kk - 1)) * ")},chosenNextStep)))"), kk, step, step)
modifyRight = Sequence((((((((((((("SetValue(right" * kk) * ",CopyFreeObject(Element({right") * (kk - 1)) * "+studNum,right") * (kk - 1)) * "-studNum,right") * (kk - 1)) * "*studNum,right") * (kk - 1)) * "/studNum,Simplify(right") * (kk - 1)) * ")},chosenNextStep)))"), kk, step, step)
inputDefined: Sum[Zip[A ≠ "?" ∧ ReplaceAll[A, " ", ""] ≠ "", A, {stringA}]] ≟ 1
nextStepToAdd = Zip((("\textsf{" * tt) * "}"), tt, {(("Add \(" * studNum) * "\) to both sides "), (("Subtract \(" * studNum) * "\) from both sides "), (("Multiply both sides by \(" * studNum) * "\)"), (("Divide both sides by \(" * studNum) * "\)"), "Simplify "})
xPosHint = If(step ≤ 4, 11, 100)
yPosHint = If(step ≤ 4, yDropDown + 60, 60)
textHint: "\textsf{\textcolor{" + (LaTeX[colorOrange]) + "}\bold{Hint}\hspace{10} Is there anything that can be simplified? If not, determine the\\operation that would be evaluated to x last and apply the inverse.}"
textSolution: "\text{\bold{Solution}\hspace{10} " + (LaTeX[If[yourSolution, "Compare your solution to the correct solution.", "Use the slider to see each step of the solution."]]) + "}"
tableSol = TableText(Join[{{Prompt}, Zip[Append[ll, tt], ll, eqs, tt, just]}], "rcll", 5, 65)
q3 = Polygon({(0.5, -4.5), (12, -4.5), (12, Max[-4.5, 0.75 + 1.14 - (1.14 * n_{1})]), (0.5, Max[-4.5, 0.75 + 1.14 - (1.14 * n_{1})])})
slp: (65 * y(Cor3 - Cor1) / 500)
tabOrder: {textQuestion, text1, nextStep, InputBox1, btnApply, btnUndo, btnValidate, textHint, textSolution, btnToggle, nsl, btnNew}

Tool: PixelsToPoint
PixelsToPoint(Corner1,Corner3,Corner5,PixelCoords)
Input: Corner1, Corner3, Corner5, InputPixels
Output: OutputPoint

InputPixels: (100, 200)
xRight: x(Corner3)
xLeft: x(Corner1)
yTop: y(Corner3)
yBottom: y(Corner1)
yCoord: yTop - (y(InputPixels) / y(Corner5) * (yTop - yBottom))
xCoord: (x(InputPixels) / x(Corner5) * (xRight - xLeft)) + xLeft
OutputPoint: (xCoord, yCoord)

Tool: expandSegment
expandSegment(A,B,pixelGap,Corner1,Corner3,Corner5)
Input: A, B, pixelGap, Corner1, Corner3, Corner5
Output: newPoly

distanceX: (pixelGap / x(Corner5) * (x(Corner3) - x(Corner1)))
distanceY: (pixelGap / y(Corner5) * (y(Corner3) - y(Corner1)))
pointGap: distanceX
xyScale: distanceY / distanceX
A: (0, 0)
vecAB: B - A
pVec: (20 * UnitVector[(((-y(vecAB))) / xyScale, (x(vecAB) * xyScale))])
pVecAngle = Angle(xAxis, Line[(0, 0), pVec])
realAngle = If(pVecAngle ≟ pi / 2 ∨ pVecAngle ≟ (3 * pi / 2), pVecAngle, atand(tan(pVecAngle) / xyScale))
curveFunction = CurveCartesian((pointGap * cos(u)), ((pointGap * xyScale) * sin(u)), u, 0, (2 * pi))
K: curveFunction(realAngle)
vSpace = Vector(K)
allPoints: {A + vSpace, A - vSpace, B - vSpace, B + vSpace}
newPoly = Polygon(allPoints)

Tool: onboardingTextOffset
onboardingTextOffset(textCorner1,textCorner3,case,corner1,corner3,corner5)
Input: CornerText1, CornerText3, case, Corner1, Corner3, Corner5
Output: TextOffset

xPixels: ((x(CornerText3) - x(CornerText1)) * x(Corner5) / (x(Corner3) - x(Corner1)))
yPixels: ((y(CornerText3) - y(CornerText1)) * y(Corner5) / (y(Corner3) - y(Corner1)))
xOffset = Element({27, (-xPixels) + 2, 16 - xPixels / 2, 16 - xPixels / 2}, case)
yOffset = Element({-23, -23, yPixels - 27, -49}, case)
TextOffset: (xOffset, yOffset)