100\%

$\textsf{TRY ANOTHER}$

$\textsf{Show tick marks}$

\text{Drag to change}

count = 7
B = (0.8, 0)
allNum = Shuffle(Sequence[(20 * k), k, 1, 25])
currPerc: (x(B) * 10)
labCurrPerc: "" + (LaTeX[currPerc]) + "\%"
allPercCorners: {Corner[labCurrPerc, 1], Corner[labCurrPerc, 2], Corner[labCurrPerc, 3], Corner[labCurrPerc, 4]}
A = Intersect(xAxis, yAxis)
D: (0, 3)
C = (0.8, 3)
tapePoly, g, h, i, j = Polygon(B, C, (0, y(C)), (0, y(B)))
E: (10, 0)
F: (x(E), 3)
framePoly, a_1, e, f, d_1 = Polygon(A, E, F, D)
allPerc = Shuffle(Sequence[(5 * k), k, 1, 19])
perc = Element(allPerc, Mod[count, Length[allPerc]] + 1)
num = Element(allNum, Mod[count, Length[allNum]] + 1)
textQuestion: "\text{Find " + (LaTeX[perc]) + "\% of " + (LaTeX[num]) + ".}"
labNum: "" + (LaTeX[num]) + ""
currNum: (num * x(B) / 10)
labCurrNum: "" + (LaTeX[currNum]) + ""
P: (-0.5, 1.5)
allNumCorners: {Corner[labCurrNum, 1], Corner[labCurrNum, 2], Corner[labCurrNum, 3], Corner[labCurrNum, 4]}
framePerc = Polygon(allPercCorners)
frameNum = Polygon(allNumCorners)
labCurrPercCorrect: "" + (LaTeX[currPerc]) + "\%"
labCurrNumCorrect: "" + (LaTeX[currNum]) + ""
ans: (num * perc / 100)
textFeedback: "\text{" + (LaTeX[ans]) + " is " + (LaTeX[perc]) + "\% of " + (LaTeX[num]) + ".}"
showTicks = false
shortTicks = Sequence(Segment[(t, y(A) - 0.05), (t, y(A) + 0.05)], t, x(A) + Distance[A, E] / 10, x(E) - Distance[A, E] / 10, Distance[A, E] / 10)
G = (1.033154487977298, 1.262250643231352)
H = (1.4098775637740537, 1.262250643231352)
tabOrder: {textQuestion, g, textOnboarding, labCurrPerc, labCurrNum, labTot, labNum, showTicks, textFeedback, btnNew}
onboarding = true
pulsingSpeed: 8
pulsing = 0.3 (slider from 0 to 1, step 0.1)
pulsingObject = expandSegment(B, C, (7 * pulsing), Corner[1], Corner[3], Corner[5])

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)