#C75000

$%v$

$%v$

$a=\vphantom{b}$

?

\text{Click to start}

#4D4D4D

$\text{Check}$

$\text{NEW PROBLEM}$

Fix position and allow selection for all text objects

Empty all input boxes

\text{This is the answer.}

$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

#E07415

#eeeeee

#2E006758

#2EB00020

PlayPause

Pause

allRandomSeeds = RandomUniform(0, 0.99, 200)
b = 1 (slider from 1 to 20, step 1)
a = 1 (slider from 1 to 20, step 1)
showsolution = false
countQuestion = 0
numRandoms: 2
randIndex: (Mod[countQuestion, floor(Length[allRandomSeeds] / numRandoms)] * numRandoms) + 1
currentRandomSeeds = Take(allRandomSeeds, randIndex, randIndex + numRandoms - 1)
randomNum1: 1 + floor((currentRandomSeeds(1) * 221))
B1: 90
B2: 20
B3: 40
B4: 80
B5: 100
B6: 15
B7: 45
B8: 75
B9: 105
B10: 12
B11: 24
B12: 36
B13: 48
B14: 72
B15: 84
B16: 96
B17: 30
B18: 20
B19: 40
B20: 80
B21: 100
B22: 15
B23: 45
B24: 75
B25: 105
B26: 12
B27: 24
B28: 36
B29: 48
B30: 72
B31: 84
B32: 96
B33: 108
B34: 30
B35: 90
B36: 40
B37: 80
B38: 100
B39: 15
B40: 45
B41: 75
B42: 12
B43: 24
B44: 36
B45: 48
B46: 30
B47: 90
B48: 20
B49: 80
B50: 100
B51: 15
B52: 45
B53: 75
B54: 12
B55: 24
B56: 36
B57: 48
B58: 72
B59: 96
B60: 30
B61: 90
B62: 20
B63: 40
B64: 80
B65: 45
B66: 75
B67: 105
B68: 12
B69: 24
B70: 36
B71: 48
B72: 30
B73: 90
B74: 20
B75: 40
B76: 80
B77: 15
B78: 75
B79: 105
B80: 12
B81: 24
B82: 36
B83: 48
B84: 72
B85: 108
B86: 30
B87: 90
B88: 20
B89: 40
B90: 80
B91: 100
B92: 15
B93: 45
B94: 105
B95: 12
B96: 24
B97: 36
B98: 48
B99: 30
B100: 90
B101: 20
B102: 40
B103: 80
B104: 15
B105: 45
B106: 75
B107: 12
B108: 24
B109: 36
B110: 48
B111: 84
B112: 30
B113: 90
B114: 20
B115: 40
B116: 15
B117: 45
B118: 24
B119: 36
B120: 48
B121: 72
B122: 84
B123: 96
B124: 108
B125: 30
B126: 90
B127: 20
B128: 40
B129: 80
B130: 15
B131: 45
B132: 24
B133: 36
B134: 48
B135: 72
B136: 84
B137: 96
B138: 108
B139: 30
B140: 90
B141: 20
B142: 40
B143: 80
B144: 15
B145: 45
B146: 12
B147: 24
B148: 48
B149: 72
B150: 84
B151: 96
B152: 108
B153: 30
B154: 90
B155: 20
B156: 40
B157: 80
B158: 15
B159: 45
B160: 12
B161: 24
B162: 36
B163: 72
B164: 84
B165: 96
B166: 108
B167: 30
B168: 90
B169: 20
B170: 40
B171: 80
B172: 15
B173: 45
B174: 12
B175: 24
B176: 36
B177: 48
B178: 84
B179: 96
B180: 108
B181: 30
B182: 90
B183: 20
B184: 40
B185: 15
B186: 45
B187: 105
B188: 12
B189: 24
B190: 36
B191: 48
B192: 72
B193: 96
B194: 108
B195: 30
B196: 90
B197: 20
B198: 40
B199: 80
B200: 15
B201: 45
B202: 12
B203: 24
B204: 36
B205: 48
B206: 72
B207: 84
B208: 108
B209: 30
B210: 90
B211: 20
B212: 40
B213: 15
B214: 45
B215: 12
B216: 24
B217: 36
B218: 48
B219: 72
B220: 84
B221: 96
numsY: {B1, B2, B3, B4, B5, B6, B7, B8, B9, B10, B11, B12, B13, B14, B15, B16, B17, B18, B19, B20, B21, B22, B23, B24, B25, B26, B27, B28, B29, B30, B31, B32, B33, B34, B35, B36, B37, B38, B39, B40, B41, B42, B43, B44, B45, B46, B47, B48, B49, B50, B51, B52, B53, B54, B55, B56, B57, B58, B59, B60, B61, B62, B63, B64, B65, B66, B67, B68, B69, B70, B71, B72, B73, B74, B75, B76, B77, B78, B79, B80, B81, B82, B83, B84, B85, B86, B87, B88, B89, B90, B91, B92, B93, B94, B95, B96, B97, B98, B99, B100, B101, B102, B103, B104, B105, B106, B107, B108, B109, B110, B111, B112, B113, B114, B115, B116, B117, B118, B119, B120, B121, B122, B123, B124, B125, B126, B127, B128, B129, B130, B131, B132, B133, B134, B135, B136, B137, B138, B139, B140, B141, B142, B143, B144, B145, B146, B147, B148, B149, B150, B151, B152, B153, B154, B155, B156, B157, B158, B159, B160, B161, B162, B163, B164, B165, B166, B167, B168, B169, B170, B171, B172, B173, B174, B175, B176, B177, B178, B179, B180, B181, B182, B183, B184, B185, B186, B187, B188, B189, B190, B191, B192, B193, B194, B195, B196, B197, B198, B199, B200, B201, B202, B203, B204, B205, B206, B207, B208, B209, B210, B211, B212, B213, B214, B215, B216, B217, B218, B219, B220, B221} / 60
numY = Element(numsY, randomNum1)
input1: NaN
InputBox1 = Textfield(input1)
l1 = Split(inputAsText, {"/", "."})
operationInInput: Defined[IndexOf["+", inputAsText]] ∨ Defined[IndexOf["-", inputAsText]] ∨ Defined[IndexOf["*", inputAsText]]
correct2: (¬operationInInput) ∧ Length[l1] ≤ 2
A221: 108
A220: 108
A219: 108
A218: 108
A217: 108
A216: 108
A215: 108
A214: 108
A213: 108
A212: 108
A211: 108
A210: 108
A209: 108
A208: 96
A207: 96
A206: 96
A205: 96
A204: 96
A203: 96
A202: 96
A201: 96
A200: 96
A199: 96
A198: 96
A197: 96
A196: 96
A195: 96
A194: 84
A193: 84
A192: 84
A191: 84
A190: 84
A189: 84
A188: 84
A187: 84
A186: 84
A185: 84
A184: 84
A183: 84
A182: 84
A181: 84
A180: 72
A179: 72
A178: 72
A177: 72
A176: 72
A175: 72
A174: 72
A173: 72
A172: 72
A171: 72
A170: 72
A169: 72
A168: 72
A167: 72
A166: 48
A165: 48
A164: 48
A163: 48
A162: 48
A161: 48
A160: 48
A159: 48
A158: 48
A157: 48
A156: 48
A155: 48
A154: 48
A153: 48
A152: 36
A151: 36
A150: 36
A149: 36
A148: 36
A147: 36
A146: 36
A145: 24
A144: 24
A143: 24
A142: 24
A141: 24
A140: 24
A139: 24
A138: 12
A137: 12
A136: 12
A135: 12
A134: 12
A133: 12
A132: 12
A131: 24
A130: 24
A129: 24
A128: 24
A127: 24
A126: 24
A125: 24
A124: 12
A123: 12
A122: 12
A121: 12
A120: 12
A119: 12
A118: 12
A117: 12
A116: 12
A115: 12
A114: 12
A113: 12
A112: 12
A111: 105
A110: 105
A109: 105
A108: 105
A107: 105
A106: 105
A105: 105
A104: 105
A103: 105
A102: 105
A101: 105
A100: 105
A99: 105
A98: 75
A97: 75
A96: 75
A95: 75
A94: 75
A93: 75
A92: 75
A91: 75
A90: 75
A89: 75
A88: 75
A87: 75
A86: 75
A85: 45
A84: 45
A83: 45
A82: 45
A81: 45
A80: 45
A79: 45
A78: 45
A77: 45
A76: 45
A75: 45
A74: 45
A73: 45
A72: 45
A71: 15
A70: 15
A69: 15
A68: 15
A67: 15
A66: 15
A65: 15
A64: 15
A63: 15
A62: 15
A61: 15
A60: 15
A59: 40
A58: 40
A57: 40
A56: 40
A55: 40
A54: 40
A53: 40
A52: 40
A51: 40
A50: 40
A49: 40
A48: 40
A47: 40
A46: 40
A45: 20
A44: 20
A43: 20
A42: 20
A41: 20
A40: 20
A39: 20
A38: 20
A37: 20
A36: 20
A35: 20
A34: 20
A33: 90
A32: 90
A31: 90
A30: 90
A29: 90
A28: 90
A27: 90
A26: 90
A25: 90
A24: 90
A23: 90
A22: 90
A21: 90
A20: 90
A19: 90
A18: 90
A17: 90
A16: 30
A15: 30
A14: 30
A13: 30
A12: 30
A11: 30
A10: 30
A9: 30
A8: 30
A7: 30
A6: 30
A5: 30
A4: 30
A3: 30
A2: 30
A1: 30
numsX: {A1, A2, A3, A4, A5, A6, A7, A8, A9, A10, A11, A12, A13, A14, A15, A16, A17, A18, A19, A20, A21, A22, A23, A24, A25, A26, A27, A28, A29, A30, A31, A32, A33, A34, A35, A36, A37, A38, A39, A40, A41, A42, A43, A44, A45, A46, A47, A48, A49, A50, A51, A52, A53, A54, A55, A56, A57, A58, A59, A60, A61, A62, A63, A64, A65, A66, A67, A68, A69, A70, A71, A72, A73, A74, A75, A76, A77, A78, A79, A80, A81, A82, A83, A84, A85, A86, A87, A88, A89, A90, A91, A92, A93, A94, A95, A96, A97, A98, A99, A100, A101, A102, A103, A104, A105, A106, A107, A108, A109, A110, A111, A112, A113, A114, A115, A116, A117, A118, A119, A120, A121, A122, A123, A124, A125, A126, A127, A128, A129, A130, A131, A132, A133, A134, A135, A136, A137, A138, A139, A140, A141, A142, A143, A144, A145, A146, A147, A148, A149, A150, A151, A152, A153, A154, A155, A156, A157, A158, A159, A160, A161, A162, A163, A164, A165, A166, A167, A168, A169, A170, A171, A172, A173, A174, A175, A176, A177, A178, A179, A180, A181, A182, A183, A184, A185, A186, A187, A188, A189, A190, A191, A192, A193, A194, A195, A196, A197, A198, A199, A200, A201, A202, A203, A204, A205, A206, A207, A208, A209, A210, A211, A212, A213, A214, A215, A216, A217, A218, A219, A220, A221} / 60
numX = Element(numsX, randomNum1)
correct1: input1 ≟ numX / numY
Gender: {"He", "She", "She", "She", "He"}
names: {"Samuel", "Angela", "Nora", "Hina", "Albert"}
randomNum2 = If(currentRandomSeeds(2) ≤ 0.5, 1, 2)
label2 = If(randomNum2 ≟ 2, "Days", "Buckets")
label1 = If(randomNum2 ≟ 1, "Days", "Buckets")
numXmixed: "" + (LaTeX[If[numX ≥ 1, Text[floor(numX)], ""] + (If[IsInteger[numX], "", FractionText[numX - floor(numX)]])]) + ""
resultMixed: If[numX / numY ≥ 1, Text[floor(numX / numY)], ""] + (If[IsInteger[numX / numY], "", FractionText[numX / numY - floor(numX / numY)]])
answer1: "\textsf{It takes }\mathsf{" + (LaTeX[resultMixed]) + "} \textsf{ " + (LaTeX[If[numX / numY ≥ 1, "days", "of a day"]]) + " to fill 1 bucket.}"
answer2: "\textsf{" + (LaTeX[Element[Gender, Mod[countQuestion, Length[names]] + 1]]) + " fills }\mathsf{" + (LaTeX[resultMixed]) + "}\textsf{ " + (LaTeX[If[numX / numY ≥ 1, "buckets", "of a bucket"]]) + " in one day.}"
text1: (((("\frac{" * Numerator[numX / numY]) * "}{") * Denominator[numX / numY]) * "}")
numYmixed: If[numY ≥ 1, Text[floor(numY)], ""] + (If[IsInteger[numY], "", FractionText[numY - floor(numY)]])
frac1CancelHint: "\frac{" + (LaTeX[If[b ≟ Numerator[numX], "\cancel{", "{"]]) + "" + (LaTeX[Numerator[numX]]) + "}}{" + (LaTeX[If[a ≟ Denominator[numX], "\cancel{", "{"]]) + "" + (LaTeX[Denominator[numX]]) + "}}\cdot\frac{\textcolor{" + (LaTeX[If[showsolution, "#006758", "#5145A8"]]) + "}" + (LaTeX[If[a ≟ Denominator[numX], "\cancel{", "{"]]) + "" + (LaTeX[a]) + "}}{\textcolor{" + (LaTeX[If[showsolution, "#006758", "#DA2570"]]) + "}" + (LaTeX[If[b ≟ Numerator[numX], "\cancel{", "{"]]) + "" + (LaTeX[b]) + "}}"
frac2CancelHint: "" + (LaTeX[If[¬showsolution, If[Denominator[numY] ≟ a ∧ Numerator[numY] ≟ b, (("\textcolor{" * colorOrange) * "}\ovalbox"), "\textcolor{white}\ovalbox"]]]) + "{\textcolor{" + (LaTeX[If[showsolution, "#006758", "#4D4D4D"]]) + "}{\frac{" + (LaTeX[If[Numerator[numY] ≟ b, "\cancel{", "{"]]) + "" + (LaTeX[Numerator[numY]]) + "}}{" + (LaTeX[If[Denominator[numY] ≟ a, "\cancel{", "{"]]) + "" + (LaTeX[Denominator[numY]]) + "}}\cdot\frac{\textcolor{" + (LaTeX[If[showsolution, "#006758", "#5145A8"]]) + "}" + (LaTeX[If[Denominator[numY] ≟ a, "\cancel{", "{"]]) + "" + (LaTeX[a]) + "}}{\textcolor{" + (LaTeX[If[showsolution, "#006758", "#DA2570"]]) + "}" + (LaTeX[If[Numerator[numY] ≟ b, "\cancel{", "{"]]) + "" + (LaTeX[b]) + "}}}}" + (LaTeX[If[¬showsolution, If[Denominator[numY] ≟ a ∧ Numerator[numY] ≟ b, (("\textcolor{" * colorOrange) * "}{\;1}"), "\phantom{\;1}"]]]) + ""
gender: {"he", "she", "she", "she", "he"}
onboarding = false
inputSaved: {}
input2 = NaN
inputCurrent = TextToUnicode(inputAsText)
B = (5.000341064524864, 5.69392166828734)
validate = false
showanswer = false
tries = 0
countCorrect = 0
showhint = false
InputBox2 = Textfield(input2)
correct: correct1 ∧ correct2
isTypicalError: input2 ≟ input1 + 1
showbuttons = true
typicalError1: 0
typicalError2: 0
showhinttypicalerror = false
textCountCorrect: "\text{Number correct: " + (LaTeX[countCorrect]) + " }"
labelBtnValidate: "\text{CHECK (" + (LaTeX[3 - tries]) + ")}"
enableBtnValidate: inputCurrent ≠ inputSaved ∧ inputCurrent ≟ RemoveUndefined[inputCurrent] ∧ Defined[input1] ∧ (correct2 ∨ (¬correct1))
helpTextHint: "\text{Move the sliders to find the unit rate. Convert the " + (LaTeX[label2]) + " fraction to 1.}"
pixelsRight: 16
pixelsLeft: 16
pixelsBottom: 16
pixelsTop: 24
layoutY: 112
enableInput: tries < 3 ∧ (¬(validate ∧ correct))
layoutX: 158 + 32
layoutAppSize = Corner(5)
textFeedback: "" + (LaTeX[If[correct, "$\text{✓ Correct}$", "$\text{✕ " + (If[tries < 3, "Try again", "Maybe next time"]) + "}$"]]) + ""
pulsingSpeed: 8
pulsing = 0.8 (slider from 0 to 1, step 0.1)
haloPixels: (pulsing * 7)
onboardingDisplayText: "" + (LaTeX[onboardingText]) + ""
A = (4.591072725036432, 5.892161020227049)
C = (4.917208433066277, 6.084005554362252)
pulsingObject = sectorPixels(A, B, C, haloPixels + 40, Corner[1], Corner[3], Corner[5])
displayAngle = sectorPixels(A, B, C, 40, Corner[1], Corner[3], Corner[5])
layoutOnboarding = PointToPixels(Corner[onboardingDisplayText, 2], Corner[1], Corner[3], Corner[5])
onboardingX: 400
onboardingY: 148
onboardingCase: 2
OnboardingTextOffset = onboardingTextOffset(Corner[onboardingText, 1], Corner[onboardingText, 3], onboardingCase, Corner[1], Corner[3], Corner[5])
J1 = NaN
question1: "\text{In }" + (LaTeX[numXmixed]) + "\text{ " + (LaTeX[If[numX ≥ 1, "days", "of a day"]]) + " " + (LaTeX[Element[gender, Mod[countQuestion, Length[names]] + 1]]) + " collects }" + (LaTeX[numYmixed]) + "\text{ " + (LaTeX[If[numY ≥ 1, "buckets", "of a bucket"]]) + " of rain. How long does it take to fill 1 bucket?}"
question2: "\text{" + (LaTeX[Element[Gender, Mod[countQuestion, Length[names]] + 1]]) + " fills }" + (LaTeX[numXmixed]) + "\text{ " + (LaTeX[If[numX ≥ 1, "buckets", "of a bucket"]]) + " in }" + (LaTeX[numYmixed]) + "\text{ " + (LaTeX[If[numY ≥ 1, "days", "of a day"]]) + ". How many buckets does " + (LaTeX[Element[gender, Mod[countQuestion, Length[names]] + 1]]) + " fill in 1 day?}"
textQuestion: "\text{" + (LaTeX[Element[names, Mod[countQuestion, Length[names]] + 1]]) + " catches rainfall in buckets.}\\" + (LaTeX[Element[{question1, question2}, randomNum2]]) + " "
ifMixed: "=" + (LaTeX[FractionText[numX]]) + "\div" + (LaTeX[FractionText[numY]]) + "\\"
speed = 6
tableHint = TableText({"", (("\textsf{" * label1) * "}"), "\div", (("\textsf{" * label2) * "}\phantom{\;1}")}, {"", numXmixed, "\div", (numYmixed * "\phantom{\;1}")}, If[numX > 1 ∨ numY > 1, {"=", FractionText[numX], "\div", FractionText[numY]}], {"=", frac1CancelHint, "\div", frac2CancelHint}, "c")
tableSolution = TableText({"", (("\textsf{" * label1) * "}"), "\div", (("\textsf{" * label2) * "}")}, {"", numXmixed, "\div", numYmixed}, If[numX > 1 ∨ numY > 1, {"=", FractionText[numX], "\div", FractionText[numY]}, {}], {"=", frac1CancelHint, "\div", frac2CancelHint}, {"=", text1, "\div", "1"}, {"=", resultMixed, "", "", If[randomNum2 ≟ 1, answer1, answer2]}, "c")
textHint: "\textsf{\color{" + (LaTeX[colorOrange]) + "}\bold{Hint}\\" + (LaTeX[If[showhinttypicalerror, helpTextHintTypicalError]]) + "" + (LaTeX[If[showhint ∧ showhinttypicalerror, "\\"]]) + "" + (LaTeX[If[showhint, helpTextHint]]) + "}\\" + (LaTeX[tableHint]) + ""
ysld1: If[numX ≥ 1 ∨ numY ≥ 1, 347, 347 - 35] + 15
ysld2: If[numX ≥ 1 ∨ numY ≥ 1, 344 + 35, 344] + 15
textSolution_{1}: "\textsf{\bold{Possible Solution}}\\" + (LaTeX[tableSolution]) + ""
D: (3.5, -0.1)
E: (5, -0.1)
Cor1 = (-0.5461863775011453, -0.8756711859515786)
Cor3 = (6.77951850401864, 3.709745086520934)
x1 = 4.91400019985689
x2 = 3.173737702699218
x3 = 3.5010947293629178
x4 = 5.396015224618462
anim = 1 (slider from 0 to 1)
f = Segment((x1, 2), (x1 - 1 / 2, 0))
g = Segment((x2, 2), (x2 - 1 / 2, 0))
h = Segment((x3, 2), (x3 - 1 / 2, 0))
i = Segment((x4, 2), (x4 - 1 / 2, 0))
F = Point(f)
G = Point(g)
H = Point(h)
I = Point(i)
start = true
x5 = 4.661100650995291
j = Segment((x5, 2), (x5 - 1 / 2, 0))
x6 = 5.76078916631213
k = Segment((x6, 2), (x6 - 1 / 2, 0))
J = Point(j)
K = Point(k)
labelInputBox: "\textsf{" + (LaTeX[If[randomNum2 ≟ 1, "days", "buckets"]]) + "}"
MoveGL = (4.407821548626609, 2.4716826929533555)
p: y = y(MoveGL)
textWarning: "\textsf{\textcolor{" + (LaTeX[colorOrange]) + "}{Simplify your answer.}}"

Tool: PointToPixels
PointToPixels(InputPoint,Corner1,Corner3,Corner5)
Input: InputPoint, Corner1, Corner3, Corner5
Output: OutputPixels

xLeft: x(Corner1)
xRight: x(Corner3)
yTop: y(Corner3)
yBottom: y(Corner1)
yPixels: (y(Corner5) * (yTop - y(InputPoint)) / (yTop - yBottom))
xPixels: (x(Corner5) * (x(InputPoint) - xLeft) / (xRight - xLeft))
OutputPixels: (xPixels, yPixels)

Tool: sectorPixels
sectorPixels(Midpoint,B,C,pixelRadius,Corner1,Corner3,Corner5
Input: A, B, C, pixelRadius, Corner1, Corner3, Corner5
Output: newSector

pointRadius: (pixelRadius / x(Corner5) * (x(Corner3) - x(Corner1)))
BPrime: A + (pointRadius * UnitVector[B - A])
newSector = CircleSector(A, BPrime, C)

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)