$x=\vphantom{b}$

#4D4D4D

$\text{Check}$

$\text{NEW PROBLEM}$

Fix position and allow selection for all text objects

Empty all input boxes

Reset app

\text{Remember, multiplication and addition are different than exponentiation.}

#006758

#B00020

#252525

#757575

#949494

#E44461

#DA2570

#E66B9E

#3A6ED6

#5991FF

#008475

#0F8538

#00a83c

#5145A8

#6557D2

#8575FF

#903D14

#BD6C43

#C75000

#E07415

\text{Remember, the exponent describes the number of times to multiply the base. }

#eeeeee

#2E006758

#2EB00020

\text{Please use the asterisk * \
to enter the multiplication sign.}

inputTemp = NaN
countQuestion = 0
allExpon = Shuffle(2…9)
valExpon = Element(allExpon, Mod[countQuestion, Length[allExpon]] + 1)
allBase = Shuffle(2…9)
valBase = Element(allBase, Mod[countQuestion, Length[allBase]] + 1)
input1 = NaN
uniBase = TextToUnicode(("" * valBase))
countCorrect = 0
typicalError2: inputTemp ≟ valBase + valExpon ∧ (valBase * valExpon) ≠ 4
InputBox1 = Textfield(input1)
userUni: TextToUnicode[InputBox1 + ""] \ {32, 40, 41}
givenAns: valBase^(valExpon)
correctVal: input1 ≟ givenAns
T1 = (0, 0)
showsolution = false
inputSaved: {NaN}
inputCurrent: {input1}
validate = false
showanswer = false
tries = 0
showhint = false
correctText: CountIf[x ≟ uniBase(1), userUni] ≟ valExpon ∧ CountIf[x ≟ 43, userUni] ≟ 0
correct: correctVal ∧ correctText
showbuttons = true
typicalError1: inputTemp ≟ (valBase * valExpon) ∧ (valBase * valExpon) ≠ 4
showhinttypicalerror: typicalError1 ∨ typicalError2
textCountCorrect: "\text{Number correct: " + (LaTeX[countCorrect]) + " }"
labelBtnValidate: "\text{CHECK (" + (LaTeX[3 - tries]) + ")}"
enableBtnValidate: inputCurrent ≠ inputSaved ∧ inputCurrent ≟ RemoveUndefined[inputCurrent]
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)
textFeedback: "" + (LaTeX[If[correct, "$\text{✓ Correct}$", "$\text{✕ " + (If[tries < 3, "Try again", "Maybe next time"]) + "}$"]]) + ""
labelInput1: "" + (LaTeX[valBase]) + "^{" + (LaTeX[valExpon]) + "}="
aniSli = 1 (slider from 1 to valExpon, step 1)
speed: 3
textQuestion: "\text{Express " + (LaTeX[valBase]) + "^{" + (LaTeX[valExpon]) + "} as repeated multiplication.}\\"
textAnswer: "\text\bold{Answer}\\\\" + (LaTeX[labelInput1]) + "" + (LaTeX[Sum[Sequence[(valBase * k / k) + If[k < valExpon, " \;· ", ""], k, 1, valExpon]]]) + ""
textSolution: "\text{\bold{Solution}}\\\\\\" + (LaTeX[valBase]) + "^{" + (LaTeX[valExpon]) + "}=\underbrace{" + (LaTeX[valBase]) + "" + (LaTeX[Sum[Sequence["·" + valBase + "\,", k, 1, aniSli - 1]]]) + "}_{\text\bold{" + (LaTeX[aniSli]) + " " + (LaTeX[If[aniSli ≟ 1, "factor", "factors"]]) + "}}"
xCount = CountIf(x ≟ 120, userUni)

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: 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: PointToPixels
PointToPixels(Corner1,Corner3,Corner5,InputPoint)
Input: Corner1, Corner3, Corner5, InputPoint
Output: OutputPixels

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