#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{Use the point to draw the angle.}

#eeeeee

#2E006758

#2EB00020

\text{Drag to start}

$a=\vphantom{b}$

\text{Describe the applet here}

$\text{Some string input}$

allRandomSeeds = RandomUniform(0, 0.99, 200)
inputSaved: {"", "", ""}
inputDefined: Sum[Zip[A ≠ "?" ∧ ReplaceAll[A, " ", ""] ≠ "", A, {stringA}]] ≟ 1
validA = true
validB = true
validC = true
inputCurrent: {stringA, stringB, stringC}
inputValid: Sum[{validA}] ≟ 1
inputA = NaN
inputB = NaN
numRandoms: 2
countQuestion = 0
randIndex: (Mod[countQuestion, floor(Length[allRandomSeeds] / numRandoms)] * numRandoms) + 1
currentRandomSeeds = Take(allRandomSeeds, randIndex, randIndex + numRandoms - 1)
AngDeg: floor((currentRandomSeeds(1) * 361))
onboarding = false
Case = If(currentRandomSeeds(2) ≤ 0.5, 1, 2)
validate = false
showanswer = false
showsolution = false
tries = 0
countCorrect = 0
showhint = false
AngRad: (AngDeg / 180 * pi)
correct1: inputA ≟ (180 * AngRad / pi) ∨ inputA ≟ round((180 * AngRad / pi))
AngRadFracPi: AngDeg / 180
AngRadText = If(Denominator[AngRadFracPi] ∈ {1, 2, 3, 4, 5, 6, 10, 12, 15, 18, 20} ∨ Mod[countQuestion, 2] ≟ 0, (FractionText[AngRadFracPi] * "\pi"), Text[AngRad])
sol1: "" + (LaTeX[AngDeg]) + "\degree\cdot\frac{\pi\textsf{ radians}}{180\degree}=" + (LaTeX[AngRadText]) + "\textsf{ radians}"
sol2: "" + (LaTeX[AngRadText]) + "\textsf{ radians}\cdot\frac{180\degree}{\pi \textsf{ radians}}=" + (LaTeX[AngDeg]) + "\degree"
textSolution: "\textsf{\bold{Possible Solution}}\\" + (LaTeX[If[Case ≟ 1, sol1, sol2]]) + ""
InputBoxB = Textfield(inputB)
correct2: inputA ≟ AngRad ∨ inputA ≟ round(AngRad)
correct = If(Case ≟ 1, correct2, correct1)
isTypicalError: inputB ≟ inputA + 1
showbuttons = true
showhinttypicalerror = false
textCountCorrect: "\text{Number correct: " + (LaTeX[countCorrect]) + " }"
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 = 180
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]) + ""
solutionView: showanswer ∨ showsolution
InputBoxA = Textfield(inputA)
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)
textQuestion: "\text{Convert \(" + (LaTeX[If[Case ≟ 1, Text[AngDeg], AngRadText]]) + "\)" + (LaTeX[If[Case ≟ 1, "\degree", " radians"]]) + " to " + (LaTeX[If[Case ≟ 2, "degrees", "radians"]]) + ".\\Enter the exact answer or round your answer to the nearest whole number.} "
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]) + ")}"
enableInput: tries < maxTries ∧ (¬(validate ∧ correct))
IBLabel: "" + (LaTeX[((If[Case ≟ 1, Text[AngDeg], AngRadText] * "\text{") * If[Case ≟ 1, "\degree", " radians"])]) + "\vphantom{degrees radians}}="
Cor1 = (-2.2058131702112105, -5.9466472632683)
Cor3 = (9.475823308724618, 1.3653011166374822)
IBLabel2: "\textsf{" + (LaTeX[If[Case ≟ 1, "radians", "degrees"]]) + "\vphantom{" + (LaTeX[IBLabel]) + "}}"
CircCent = (5.5, -1.8)
c = Circle(CircCent, 1.75)
A = Intersect(c, Line[CircCent, CircCent + (1, 0)], 2)
Draggable = Point(c)
sectorHint = Sector(c, A, Draggable)
PositionsLabels = Sequence(Dilate[Rotate[A, ii, CircCent], 1.175, CircCent], ii, 45°, 360°, 45°)
labelsRads = Zip(Text[(If[kk ≟ 1, "", FractionText[kk]] * "\pi"), PP, true, true, 0, 0], kk, Sequence[1 / 4, 2, 1 / 4], PP, PositionsLabels)
labelsDegs = Zip(Text[(kk * "°"), PP, true, true, 0, 0], kk, Sequence[45, 360, 45], PP, PositionsLabels)
sectorSol = Sector(c, A, Rotate[A, AngRad, CircCent])
correctDrawing: abs(Area[sectorHint] - Area[sectorSol]) ≤ 0.1
colorSector: If[correctDrawing, {0, 132, 114}, {224, 116, 32}] / 255
showRadians = true
captionBtnToogle: "" + (LaTeX[If[showRadians, "\textsf{DEGREES}", "\textsf{RADIANS}"]]) + ""
tabOrder: {textQuestion, InputBoxA, btnValidate, textHint, Draggable, btnToggle, textSolution, btnNew}
B = (3.4451784764739966, -4.849855006282433)
f: y = y(B)
widthLabel: (x(Corner[IBLabel, 2] - Corner[IBLabel, 1]) / x(Cor3 - Cor1) * 800)
IBLabelPos: IBLabel
text1: IBLabel2
heigthLabel: (y(Corner[IBLabel, 4] - Corner[IBLabel, 1]) / y(Cor3 - Cor1) * 500)
heigthLabel2: (y(Corner[IBLabel2, 4] - Corner[IBLabel2, 1]) / y(Cor3 - Cor1) * 500)

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)