#006758

#252525

#4D4D4D

$\text{Check}$

$\text{NEW PROBLEM}$

Fix position and allow selection for all text objects

Empty all input boxes

\text{This is the answer.}

\text{\bold{Possible Solution}\
This is the solution}

Reset app

\text{This is the error specific hint}

#B00020

#757575

#949494

#E44461

#DA2570

#E66B9E

#3A6ED6

#5991FF

#008475

#0F8538

#00a83c

#5145A8

#6557D2

#8575FF

#903D14

#BD6C43

#C75000

#E07415

\text{Check the values in the table and compare them to the heights of the bars.}

#eeeeee

#2E006758

#2EB00020

\text{Drag to start}

\text{Microwave Time (minutes)}

Bar5b_{1} = (5, 10)
countQuestion = 0
allRandomSeeds = Sequence(Random[0, 99] / 100, A, 1, 200)
numRandoms: 15
randIndex: (Mod[countQuestion, floor(Length[allRandomSeeds] / numRandoms)] * numRandoms) + 1
currentRandomSeeds = Take(allRandomSeeds, randIndex, randIndex + numRandoms - 1)
randomFreq: {4, 8, 12, 14, 7} + Zip[CountIf[x ≥ A ∧ x < B, currentRandomSeeds], A, {0, 0.1, 0.3, 0.6, 0.9}, B, {0.1, 0.3, 0.6, 0.9, 1}]
randomNum5: (5 * randomFreq(5))
Bar5a_{1} = (4, 10)
input5: y(Bar5a_{1})
dif5: randomNum5 - input5
timer = -0.5 (slider from -2 to 1, step 0.01)
timerAns = If(timer < 0, 0, timer)
Bar4a_{1} = (3, 10)
input4: y(Bar4a_{1})
Bar3a_{1} = (2, 10)
input3: y(Bar3a_{1})
Bar2a_{1} = (1, 10)
input2: y(Bar2a_{1})
Bar1a_{1} = (0, 10)
input1: y(Bar1a_{1})
correct5: input5 ≟ randomNum5
randomNum4: (5 * randomFreq(4))
correct4: input4 ≟ randomNum4
randomNum3: (5 * randomFreq(3))
correct3: input3 ≟ randomNum3
randomNum2: (5 * randomFreq(2))
correct2: input2 ≟ randomNum2
randomNum1: (5 * randomFreq(1))
correct1: input1 ≟ randomNum1
correctList: {correct1, correct2, correct3, correct4, correct5}
colorRow = Zip(If[timer ≟ 1 ∧ A ≟ true, colorTealSuccess, colorBlack], A, correctList)
randomFreqColor = Sequence((("\color{" * colorRow(A)) * "}") + ((5 * Element[randomFreq, A])), A, 1, 5)
onboarding = true
inputSaved: {10, 10, 10, 10, 10}
PMoveA = (3.4347091871177713, 5.572495645015256)
inputCurrent: {input1, input2, input3, input4, input5}
validate = false
showanswer = false
showsolution = false
tries = 0
countCorrect = 0
showhint = false
correct: correct1 ∧ correct2 ∧ correct3 ∧ correct4 ∧ correct5
showbuttons = true
typicalError1: 0
typicalError2: 0
showhinttypicalerror = false
textCountCorrect: "\text{Number correct: " + (LaTeX[countCorrect]) + " }"
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: 330
enableInput: tries < 3 ∧ (¬(validate ∧ correct))
layoutX: 15
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"]) + "}$"]]) + ""
PMoveB = (4.1638207264560645, 6.136241785204535)
StartA = (3.4347091871177713, 5.572495645015256)
StartB = (4.1638207264560645, 6.136241785204535)
pulsingSpeed: 8
pulsing = 0.3 (slider from 0 to 1, step 0.1)
haloPixels: (pulsing * 7)
count = 2
pulsingObject = expandSegment(PMoveA, PMoveB, (pulsing * 7), Corner[1], Corner[3], Corner[5])
onboardingCase: 4
onboardingX: 575
onboardingY: 326
OnboardingTextOffset = onboardingTextOffset(Corner[onboardingText, 1], Corner[onboardingText, 3], onboardingCase, Corner[1], Corner[3], Corner[5])
onboardingDisplayText: "" + (LaTeX[onboardingText]) + ""
isTypicalError: false
tableFreq = TableText({"\text\bold{Microwave Time\\     (minutes)}", (("\\\color{" * colorRow(1)) * "}0-1"), (("\\\color{" * colorRow(2)) * "}1-2"), (("\\\color{" * colorRow(3)) * "}2-3"), (("\\\color{" * colorRow(4)) * "}3-4"), (("\\\color{" * colorRow(5)) * "}4-5")}, Append["\text\bold{   Number of\\Popped Kernels}", randomFreqColor], "|_vc")
Bar2b_{1} = (2, 10)
Bar3b_{1} = (3, 10)
Bar4b_{1} = (4, 10)
Bar1b_{1} = (1, 10)
bar1_{1} = twoPointBox(Bar1a_{1}, Bar1b_{1})
bar2_{1} = twoPointBox(Bar2a_{1}, Bar2b_{1})
bar3_{1} = twoPointBox(Bar3a_{1}, Bar3b_{1})
bar4_{1} = twoPointBox(Bar4a_{1}, Bar4b_{1})
bar5_{1} = twoPointBox(Bar5a_{1}, Bar5b_{1})
xxx: (2, 0)
barOutlines_{1} = Zip(twoPointBox[CLIPBOARDmagicSTRINGA, CLIPBOARDmagicSTRINGB], CLIPBOARDmagicSTRINGA, {Bar1a_{1}, Bar2a_{1}, Bar3a_{1}, Bar4a_{1}, Bar5a_{1}}, CLIPBOARDmagicSTRINGB, {Bar1b_{1}, Bar2b_{1}, Bar3b_{1}, Bar4b_{1}, Bar5b_{1}})
currentPosition_{1}: {Bar1a_{1}, Bar2a_{1}, Bar3a_{1}, Bar4a_{1}, Bar5a_{1}}
lastPosition_{1}: {(0, 1), (10, 1), (20, 1), (30, 1), (40, 1)}
labelY_{1} = VerticalText("Number of Popped Kernels")
barPositions_{1}: {{0, 1}, {1, 2}, {2, 3}, {3, 4}, {4, 5}}
questionNumbersX_{1} = Sequence(Text[("" * A), (0, 0) + (A, 0), true, true, 0, -1], A, 0, 5, 1)
maxY: (ceil(Max[Append[22, randomFreq]] / 2) * 10) + 20
horizGrids_{1} = Sequence(Segment[(0, A), (5.5, A)], A, 10, maxY, 10)
maxFreq: maxY - 20
randomFreq2: (5 * randomFreq)
viewBox = Polygon({(-0.1, -3), (5.5, -3), (5.5, maxFreq + 5), (-0.1, maxFreq + 5)})
questionNumbersY_{1} = Zip(Text[("" * CLIPBOARDmagicSTRINGA), (0, 2) + (0, CLIPBOARDmagicSTRINGA), true, true, -1, 0], CLIPBOARDmagicSTRINGA, Sequence[20, (ceil(Max[Append[22, randomFreq]] / 2) * 10), 20])
speed: 1
dif1: randomNum1 - input1
barAns1 = twoPointBox(Bar1a_{1} + (0, (timerAns * dif1)), Bar1b_{1} + (0, (timerAns * dif1)))
dif2: randomNum2 - input2
dif3: randomNum3 - input3
dif4: randomNum4 - input4
barAns2 = twoPointBox(Bar2a_{1} + (0, (timerAns * dif2)), Bar2b_{1} + (0, (timerAns * dif2)))
barAns3 = twoPointBox(Bar3a_{1} + (0, (timerAns * dif3)), Bar3b_{1} + (0, (timerAns * dif3)))
barAns4 = twoPointBox(Bar4a_{1} + (0, (timerAns * dif4)), Bar4b_{1} + (0, (timerAns * dif4)))
barAns5 = twoPointBox(Bar5a_{1} + (0, (timerAns * dif5)), Bar5b_{1} + (0, (timerAns * dif5)))
textQuestion: "\text{Build a histogram for the data in the table.}\\\\\\" + (LaTeX[tableFreq]) + ""
crossY: 410
crossX: 437
tabOrder: {textQuestion, bar1_{1}, bar2_{1}, bar3_{1}, bar4_{1}, bar5_{1}, btnValidate, textFeedback, textHint, textCountCorrect, btnNew}
correctIndexes: Zip[If[A ≟ true, B, 0], A, correctList, B, Sequence[1, 5]] \ {0}
incorrectIndexes: Sequence[1, 5] \ correctIndexes
studentAns = Zip(Polygon[{(A - 1, 0), (A, 0), (A, Element[inputSaved, A]), (A - 1, Element[inputSaved, A])}], A, incorrectIndexes)
crossXleft = Sequence(a - 0.3, a, 0.5, 4.5, 1)
crossXright = Sequence(a + 0.3, a, 0.5, 4.5, 1)
crossYbtm = Sequence((-0.23 * maxY), n, 1, 5)
crossYtop: crossYbtm + 14
crossYbtmDeprecated = Zip(If[R ≥ A, R, A], R, {randomNum1, randomNum2, randomNum3, randomNum4, randomNum5}, A, inputSaved)
barOutlinesAns = Zip(twoPointBox[CLIPBOARDmagicSTRINGA, CLIPBOARDmagicSTRINGB], CLIPBOARDmagicSTRINGA, {Bar1a_{1} + (0, (timerAns * dif1)), Bar2a_{1} + (0, (timerAns * dif2)), Bar3a_{1} + (0, (timerAns * dif3)), Bar4a_{1} + (0, (timerAns * dif4)), Bar5a_{1} + (0, (timerAns * dif5))}, CLIPBOARDmagicSTRINGB, {Bar1b_{1} + (0, (timerAns * dif1)), Bar2b_{1} + (0, (timerAns * dif2)), Bar3b_{1} + (0, (timerAns * dif3)), Bar4b_{1} + (0, (timerAns * dif4)), Bar5b_{1} + (0, (timerAns * dif5))})
guide2 = Segment(Bar2a_{1}, (0, y(Bar2a_{1})))
guide3 = Segment(Bar3a_{1}, (0, y(Bar3a_{1})))
guide4 = Segment(Bar4a_{1}, (0, y(Bar4a_{1})))
guide5 = Segment(Bar5a_{1}, (0, y(Bar5a_{1})))
visibleGuide = 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)

Tool: PixelsToPoint (command PixelsToPoint1)
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: PixelsToPoint (command PixelsToPoint11)
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: twoPointBox
twoPointBox(A,B)
Input: C, D
Output: box2

box2, f, g, h, i = Polygon(C, D, (x(D), 0), (x(C), 0))

Tool: twoPointBox (command twoPointBox1)
twoPointBox(A,B)
Input: C, D
Output: box2

box2, f, g, h, i = Polygon(C, D, (x(D), 0), (x(C), 0))