%v

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

#006758

#B00020

#252525

#757575

#949494

#E44461

#DA2570

#E66B9E

#3A6ED6

#5991FF

#008475

#0F8538

#00a83c

#5145A8

#6557D2

#8575FF

#903D14

#BD6C43

#C75000

#E07415

\text{Observe the graph and\
compare the position of \
your point with the position\
of the target.}

#eeeeee

#2E006758

#2EB00020

\text{Drag to start}

$\math{P=}$

\text{Describe the applet here}

$\text{Some string input}$

\text{Enter the point of intersection \
for the two lines. }

x

y

countQuestion = 0
allP = Shuffle(Join[Sequence[Sequence[(j, k), j, -7, 7, 1], k, -7, 7, 1]])
SOLP = Element(allP, Mod[countQuestion, Length[allP]] + 1)
m2Count: countQuestion + 1
allM = Shuffle(Sequence[t, t, -4, 4, 1])
m2 = Element(allM, Mod[m2Count, Length[allM]] + 1)
r2: y - y(SOLP) = (m2 * (x - x(SOLP)))
q2: r2(0)
m1 = Element(allM, Mod[countQuestion, Length[allM]] + 1)
r1: y - y(SOLP) = (m1 * (x - x(SOLP)))
q1: r1(0)
inputSaved: {NaN}
inputDefined: Sum[Zip[A ≠ "?" ∧ ReplaceAll[A, " ", ""] ≠ "", A, {stringA}]] ≟ 1
validA = true
validB = true
validC = true
inputCurrent: {stringA}
inputValid: Sum[{validA}] ≟ 1
inputA = NaN
inputB = NaN
onboarding = false
validate = false
showanswer = false
showsolution = false
tries = 0
countCorrect = 0
showhint = false
textSolution: "\textsf{\bold{Possible Solution}}\\
P=" + (LaTeX[SOLP]) + "\\\\
\textsf{Substitute its coordinates into}\\
\textsf{the equations of the lines:}\\\\✓\:\:\:" + (LaTeX[y(SOLP)]) + "=" + (LaTeX[m1]) + "\cdot(" + (LaTeX[x(SOLP)]) + ")" + (LaTeX[If[q1 > 0, ("+" * q1), q1 < 0, ("" * q1), ""]]) + "\\✓\:\:\:" + (LaTeX[y(SOLP)]) + "=" + (LaTeX[m2]) + "\cdot(" + (LaTeX[x(SOLP)]) + ")" + (LaTeX[If[q2 > 0, ("+" * q2), q2 < 0, ("" * q2), ""]]) + ""
InputBoxB = Textfield(inputB)
correct1: false
correct2: false
correct: SOLP ≟ STUDP
isTypicalError: inputB ≟ inputA + 1
showbuttons = true
showhinttypicalerror = false
labelBtnValidate: "\text{CHECK (" + (LaTeX[3 - tries]) + ")}"
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)}])
textHint: "\text{\color{" + (LaTeX[colorOrange]) + "}\bold{Hint}\\" + (LaTeX[If[showhinttypicalerror, helpTextHintTypicalError]]) + "" + (LaTeX[If[showhint ∧ showhinttypicalerror, "\\"]]) + "" + (LaTeX[If[showhint, helpTextHint]]) + "}"
layoutY: 178
enableInput: tries < 3 ∧ (¬(validate ∧ correct))
layoutX: 16
layoutAppSize = Corner(5)
enableBtnValidate: inputCurrent ≠ inputSaved ∧ inputDefined ∧ inputValid
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]) + ""
textFeedback: "\text{\vphantom{✕}" + (LaTeX[If[correct, (("\textcolor{" * colorTealSuccess) * "}{✓ Correct}"), (((("\textcolor{" * colorRedError) * "}{✕ ") * If[tries < 3, "Try again", "Maybe next time"]) * "}")]]) + ""
solutionView: showanswer ∨ showsolution
InputBoxA = Textfield(STUDP)
altFeedback: "\text{" + (LaTeX[If[correct, (("Your answer is correct. Total number correct: " * countCorrect) * ". "), ("Your answer is not correct. " * If[tries < 3, "Try again. ", "Maybe next time. "])]]) + "}" + (LaTeX[If[showsolution, ("\\" * textSolution), If[showhint ∨ showhinttypicalerror, textHint, ""]]]) + ""
InputBoxC = Textfield(inputC)
numInputBoxes: 1
fakeX = Segment((-10.8, 0), (10.8, 0))
fakeY = Segment((0, -10.8), (0, 10.8))
PC: (-10.9, -10.9)
peep, bottomPeep, rightPeep, topPeep, leftPeep = Polygon(PC, Mirror[PC, yAxis], Mirror[PC, (0, 0)], Mirror[PC, xAxis])
LR1 = Element(RemoveUndefined[{Intersect[r1, topPeep], Intersect[r1, rightPeep], Intersect[r1, leftPeep]}], 1)
LR2 = Element(RemoveUndefined[{Intersect[r2, bottomPeep], Intersect[r2, leftPeep], Intersect[r2, rightPeep]}], 1)
labelR1: "" + (LaTeX[r1]) + ""
labelR2: "" + (LaTeX[r2]) + ""
squareGridSegm = Zip({Segment[(k, -10.5), (k, 10.5)], Segment[(-10.5, k), (10.5, k)]}, k, -10…10)
tabOrder: {textQuestion, labelR1, labelR2, InputBoxA, btnValidate, textHint, textSolution, btnNew}
countCorrectFirstTry = 0
textCountCorrect: "\text{Number correct first try: " + (LaTeX[countCorrectFirstTry]) + "\\
Number correct: " + (LaTeX[countCorrect]) + " }"
OFFLR2 = If(x(LR2) > 5, (-6, 1), (-3, 1))
OFFLR1 = If(x(LR1) > 5, (-6, -1), (-3, 0))

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)