#4D4D4D

$\text{Check}$

$\text{NEW PROBLEM}$

Fix position and allow selection for all text objects

Empty all input boxes

\text{This is the answer.}

$y_1=\vphantom{b}$

$y_2=$

Reset app

\text{This is the error specific hint}

#006758

#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}

x

y

\textsf{Please enter an }y\textsf{-coordinate between \(-9\) and \(9\).}

$\textsf{%v}$

$\textsf{%v}$

countQuestion = 0
allX1 = Shuffle({-1, 1, -2, 2, -3, 3, -4, 4, -5, 5, -6, 6})
x1Temp = Element(allX1, Mod[countQuestion, Length[allX1]] + 1)
x2Temp = Element(allX1, Mod[countQuestion, Length[allX1]] + 2)
x2 = Max(x1Temp, x2Temp)
x1 = Min(x1Temp, x2Temp)
input1 = NaN
allSlo = Shuffle({-1, 1, -2, 2, -1 / 2, 1 / 2, -3 / 2, 3 / 2})
slo = Element(allSlo, Mod[countQuestion, Length[allSlo]] + 1)
input2 = NaN
studSlo: (input1 - input2) / (x1 - x2)
onboarding = false
inputSaved: {NaN, NaN, NaN}
A = (3.4347091871177713, 5.572495645015256)
inputCurrent: {input1, input2}
randomList2 = Shuffle(Sequence[15])
randomList1 = Shuffle(Sequence[20])
validate = false
showanswer = false
showsolution = false
tries = 0
countCorrect = 0
showhint = false
InputBox1 = Textfield(input1)
InputBox2 = Textfield(input2)
correct: studSlo ≟ slo
showbuttons = true
typicalError1: 0
typicalError2: 0
showhinttypicalerror = false
textCountCorrect: "\text{Number correct: " + (LaTeX[countCorrect]) + " }"
labelBtnValidate: "\text{CHECK (" + (LaTeX[3 - tries]) + ")}"
helpTextHint: "\textsf{The current slope is }\frac{" + (LaTeX[input2]) + "-(" + (LaTeX[input1]) + ")}{" + (LaTeX[x2]) + "-(" + (LaTeX[x1]) + ")}=" + (LaTeX[FractionText[studSlo, false]]) + ""
pixelsRight: 16
pixelsLeft: 16
pixelsBottom: 16
pixelsTop: 24
borderBox = Polygon(Zip[PixelsToPoint[Corner[1], Corner[3], Corner[5], A], A, {(pixelsLeft, pixelsTop), (pixelsLeft, y(Corner[5]) - pixelsBottom), Corner[5] - (pixelsRight, pixelsBottom), (x(Corner[5]) - pixelsRight, pixelsTop)}])
layoutY: 178
enableInput: tries < 3 ∧ (¬(validate ∧ correct))
layoutX: 16
layoutAppSize = Corner(5)
enableBtnValidate: inputCurrent ≠ inputSaved ∧ inputCurrent ≟ RemoveUndefined[inputCurrent] ∧ (¬onboarding)
textFeedback: "" + (LaTeX[If[correct, "$\text{✓ Correct}$", "$\text{✕ " + (If[tries < 3, "Try again", "Maybe next time"]) + "}$"]]) + ""
B = (4.1638207264560645, 6.136241785204535)
displaySegment = Segment(A, B)
StartA = (3.4347091871177713, 5.572495645015256)
StartB = (4.1638207264560645, 6.136241785204535)
pulsingSpeed: 8
pulsing = 0.7 (slider from 0 to 1, step 0.1)
haloPixels: (pulsing * 7)
count = 2
onboardingCase: 1
onboardingX: 337
onboardingY: 150
OnboardingTextOffset = onboardingTextOffset(Corner[onboardingText, 1], Corner[onboardingText, 3], onboardingCase, Corner[1], Corner[3], Corner[5])
onboardingDisplayText: "" + (LaTeX[onboardingText]) + ""
useOnboarding: false
layoutCase: 1
layoutHintSolnY: layoutY + Element[{56, 88}, layoutCase]
layoutHintSolnX = Element({If[layoutX ≟ 16, layoutX - 5, 11], layoutX - 5}, layoutCase)
layoutFeedbackX: layoutX + Element[{If[correct ∨ tries ≟ 3, -5, 126], -5}, layoutCase]
layoutFeedbackY: layoutY + Element[{If[correct, 6, 1], If[correct, 6, If[tries ≟ 3, 1, 51]]}, layoutCase]
peep, f, g, h, i = Polygon((-10, -10), (10, -10), (10, 10), (-10, 10))
fakeX = Segment((-9.9, 0), (9.9, 0))
fakeY = Segment((0, -9.9), (0, 9.9))
xTicks = Sequence((k, 0), k, -9, 9, 1)
yTicks = Sequence((0, k), k, -9, 9, 1)
aniPoint = 0 (slider from 0 to 2, step 0.01)
PS1: (x1, input1)
PS2: (x2, input2)
P1: (x1, 0)
P1' = Dilate(P1, If[0 ≤ aniPoint ≤ 1, 1 - aniPoint, 0], PS1)
P2: (x2, 0)
P2' = Dilate(P2, If[1 ≤ aniPoint ≤ 2, 2 - aniPoint, 1], PS2)
aniSpeed: 2.5
aniLine = 0 (slider from 0 to 1, step 0.01)
V = If(studSlo > 0, (x2, input1), (x1, input2))
aniSlo = 0 (slider from 0 to 2, step 0.01)
SLY = Dilate(V, If[1 ≤ aniSlo ≤ 2, 2 - aniSlo, 1], If[studSlo > 0, P2', P1'])
studLin(x) = (studSlo * (x - x2)) + input2
studLinSlow(x) = If[x < (x(Corner[2] - Corner[1]) * aniLine) + x(Corner[1]), studLin(x)]
SLX = Dilate(If[studSlo > 0, PS1, PS2], If[0 ≤ aniSlo ≤ 1, 1 - aniSlo, 0], V)
table = TableText({Join[{{"\bold{x}"}, {x1, x2}}], Join[{{"\bold{y}"}, {"", ""}}]}, "c_|v", 80, 80)
sloX = If(studSlo > 0, Segment[PS1, SLX], Segment[PS2, SLX])
sloY = Segment(V, SLY)
xLabelLoc: {(-9, 0), (-6, 0), (-3, 0), (3, 0), (6, 0), (9, 0)}
yLabelLoc: {(0, -9), (0, -6), (0, -3), (0, 3), (0, 6), (0, 9)}
allAxesLabels: {"-9", "-6", "-3", "3", "6", "9"}
isTypicalError: false
SOLP1: (x1, 1)
SOLP2: (x2, (slo * (x2 - x1)) + 1)
solLine = Line(SOLP1, SOLP2)
textSolution: "\text{\bold{Possible Solution}\\
\vphantom{\[\left(\frac{11}{12}\right)\]}Two possible pairs are \[(" + (LaTeX[x1]) + ",1)\] and \[\left(" + (LaTeX[x2]) + "," + (LaTeX[FractionText[(slo * (x2 - x1)) + 1, false]]) + "\right)\].}"
aniPause = 0 (slider from 0 to 1, step 0.1)
squareGridSegm = Zip({Segment[(k, -9), (k, 9)], Segment[(-9, k), (9, k)]}, k, -9…9)
labelSloX: "" + (LaTeX[sloX]) + ""
labelSloY: "" + (LaTeX[sloY]) + ""
textQuestion: "\text{Complete the table so the rate} \\
\vphantom{\frac{4}{5}}\text{of change is \[" + (LaTeX[FractionText[slo, false]]) + "\].} "
validateVisibility: -9 ≤ input1 ≤ 9 ∧ -9 ≤ input2 ≤ 9 ∨ (¬Defined[input1]) ∨ (¬Defined[input2])
textHint: "\textsf{\color{" + (LaTeX[colorOrange]) + "}\bold{Hint}}\\" + (LaTeX[If[showhinttypicalerror, helpTextHintTypicalError]]) + "" + (LaTeX[If[showhint ∧ showhinttypicalerror, "\\"]]) + "" + (LaTeX[If[showhint, helpTextHint]]) + ""
xAxLabels = Zip(Text[("" * A), B, false, true, 0, 0], A, allAxesLabels, B, xLabelLoc + (-0.2, -0.5))
yAxLabels = Zip(Text[("" * A), B, false, true, 0, 0], A, allAxesLabels, B, yLabelLoc + (-1, 0.2))

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)