$\textsf{Ja}$

$\text{Überprüfen}$

$\text{Neuer Versuch}$

$\text{Neue Aufgabe}$

\text{This text shows a hint for the student.\\
It is shown after the second wrong answer\
and is displayed during the third try.}

No selection allowed for all input boxes

Selection allowed for all input boxes

Fix position and allow selection for all text objects

Empty all input boxes

#EDEDED

\text{Text for just the correct answer.}

\underline\text{Helper scripts for template}

\underline\text{Helper scripts for authors}

$a=$

$b=$

\text{This hint is for typical misconceptions of\students. It is shown after any wrong answer\that shows the typical error.}

\textsf{Hat Kathi richtig gerechnet?}

$\textsf{Nein}$

\textsf{Stelle die Rechnung richtig!}

\textsf{=}

\textsf{=}

$\textsf{Überprüfen}$

$\textsf{Überprüfen}$

\textsf{Zusatzaufgabe:}

\textsf{Kathi hat die Rechengesetze der Multiplikation kennengelernt.
\\vphantom{Äg}Kathi versucht diese anzuwenden.}

Pos2 = (-2.4416740935945733, 7.8657585002052395)
Pos1_{1} = (-4.787998075578976, 7.849350640191362)
ja = false
d = 1.5 (slider from -5 to 5, step 0.01)
questionCount = 1 (slider from -5 to 50, step 1)
LnumText = Join(Sequence[Shuffle[{1, 2, 3, 4, 5, 6, 7, 8, 9, 10}], o, 1, 12])
LwidthC: {2.7, 7.2, 6.5, 6.4}
LGesetzeorder: {"$\textsf{\vphantom{Äg}Vertauschungsgesetz (Kommutativgesetz)} $", "$\textsf{\vphantom{Äg}Verbindungsgesetz (Assoziativgesetz) }$", "$\textsf{\vphantom{Äg}Verteilungsgesetz (Distributivgesetz) }$"}
LGesetze = Join({{"$\textsf{\vphantom{Äg}Wähle aus! }$"}, LGesetzeorder})
indexc = SelectedIndex(LGesetze)
widthB3 = 1.6 (slider from -5 to 5)
widthB = 3.7 (slider from -5 to 5)
heightB = -1 (slider from -5 to 5)
B = (-2.146332613344788, 5.962446738595491)
B2: B + (widthB + 0.5, 0)
widthB2 = 2.6 (slider from -5 to 5)
B3: B2 + (widthB2 + 0.5, 0)
a: 1
Blue = (-5.32, 4.5)
Green = (-5.28, 3.68)
Orange = (-5.2, 2.86)
Red = (-5.32, 2.04)
Purple = (-5.34, 1.12)
Gray = (-5.34, 0.32)
GrayDark = (-5.36, -0.7)
showanswer = false
showsolution = false
attemptCount = 0
correctCount: 0
textCountCorrect: "\text{Richtig gelöste Aufgaben: " + (LaTeX[correctCount]) + " }"
showButtonNew = false
showButtonTryAgain = false
showButtonValidate = true
showhint = false
aInput = NaN
InputBox1 = Textfield(aInput)
bInput = NaN
InputBox2 = Textfield(bInput)
showcorrecttext = false
PtopLeftCornerFeedback = If(ja, Pos1_{1}, Pos2)
PbottomRightCornerFeedback: (x(PtopLeftCornerFeedback) + d, y(PtopLeftCornerFeedback) - 0.8)
PtopRightCornerFeedback: (x(PbottomRightCornerFeedback), y(PtopLeftCornerFeedback))
PbottomLeftCornerFeedback: (x(PtopLeftCornerFeedback), y(PbottomRightCornerFeedback))
rectangleCorrecta1, ptopleftcornerfeedback, ptoprightcornerfeedback, pbottomrightcornerfeedback, pbottomleftcornerfeedback = Polygon(PtopLeftCornerFeedback, PtopRightCornerFeedback, PbottomRightCornerFeedback, PbottomLeftCornerFeedback)
showhinttypicalerror = false
isTypicalError: bInput ≟ aInput + 1
allowCountIncrement = true
randomNosForA = Sequence(Random[2, 20], m, 1, 103)
randomNosForB = Zip(RandomElement[Sequence[2, 20] \ {a}], a, randomNosForA)
randomNosForC = Zip(RandomElement[Sequence[2, 20] \ {a, b}], a, randomNosForA, b, randomNosForB)
numA: randomNosForA(Mod[questionCount, 100] + 1)
numB: randomNosForB(Mod[questionCount, 100] + 1)
numC: randomNosForC(Mod[questionCount, 100] + 1)
Text1: "\textsf{\vphantom{Äg}" + (LaTeX[numA]) + " \cdot (" + (LaTeX[numB]) + " + " + (LaTeX[numC]) + ")   =   " + (LaTeX[numA]) + " \cdot " + (LaTeX[numB]) + " + " + (LaTeX[numA]) + " \cdot " + (LaTeX[numC]) + "   =   " + (LaTeX[(numA * numB)]) + " + " + (LaTeX[(numA * numC)]) + "   =   " + (LaTeX[(numA * numB) + (numA * numC)]) + ""
Text2: "\textsf{\vphantom{Äg}(" + (LaTeX[numA]) + " + " + (LaTeX[numB]) + ") \cdot " + (LaTeX[numC]) + "   =   " + (LaTeX[numA]) + " \cdot " + (LaTeX[numC]) + " + " + (LaTeX[numB]) + " \cdot " + (LaTeX[numC]) + "   =   " + (LaTeX[(numA * numC)]) + " + " + (LaTeX[(numB * numC)]) + "   =   " + (LaTeX[(numA * numC) + (numB * numC)]) + " "
numText: LnumText(Mod[questionCount, 100] + 1)
A = (-4.968484535731632, 9.457320921551322)
richtig: numText ≤ 5
nein = false
text61: "\textsf{" + (LaTeX[numA]) + " \cdot " + (LaTeX[numB]) + " + " + (LaTeX[numA]) + " \cdot " + (LaTeX[numC]) + "}"
text62: "\textsf{" + (LaTeX[(numA * numB)]) + " + " + (LaTeX[(numA * numC)]) + ""
text63: "\textsf{" + (LaTeX[(numA * (numB + numC))]) + ""
text71: "\textsf{" + (LaTeX[numA]) + " \cdot " + (LaTeX[numC]) + " + " + (LaTeX[numB]) + " \cdot " + (LaTeX[numC]) + ""
text72: "\textsf{" + (LaTeX[(numA * numC)]) + " + " + (LaTeX[(numB * numC)]) + ""
text73: "\textsf{" + (LaTeX[((numA + numB) * numC)]) + ""
text81: "\textsf{" + (LaTeX[numA]) + " + " + (LaTeX[numB]) + " \cdot " + (LaTeX[numC]) + ""
text82: "\textsf{" + (LaTeX[numA]) + " + " + (LaTeX[(numB * numC)]) + ""
text83: "\textsf{" + (LaTeX[numA + (numB * numC)]) + ""
text91: "" + (LaTeX[text61]) + ""
text92: "" + (LaTeX[text62]) + ""
text93: "" + (LaTeX[text63]) + ""
text101: "" + (LaTeX[text71]) + ""
text102: "" + (LaTeX[text72]) + ""
text103: "" + (LaTeX[text73]) + ""
LText1order: {If[numText ≟ 6, text61, If[numText ≟ 7, text71, If[numText ≟ 8, text81, If[numText ≟ 9, text91, If[numText ≟ 10, text101]]]]], If[numText ∈ {6, 9}, text71, text61], If[numText ≟ 8, text71, text81]}
LText2order: {If[numText ≟ 6, text62, If[numText ≟ 7, text72, If[numText ≟ 8, text82, If[numText ≟ 9, text92, If[numText ≟ 10, text102]]]]], If[numText ∈ {6, 9}, text72, text62], If[numText ≟ 8, text72, text82]}
LText1 = Join({{"$\textsf{Wähle aus! }$"}, Shuffle[LText1order]})
LText2 = Join({{"$\textsf{Wähle aus! }$"}, Shuffle[LText2order]})
LText3order: {If[numText ≟ 6, text63, If[numText ≟ 7, text73, If[numText ≟ 8, text83, If[numText ≟ 9, text93, If[numText ≟ 10, text103]]]]], If[numText ∈ {6, 9}, text73, text63], If[numText ≟ 8, text73, text83]}
LText3 = Join({{"$\textsf{Wähle aus! }$"}, Shuffle[LText3order]})
LText1alle: {text61, text71, text81, text91, text101}
LText2alle: {text62, text72, text82, text92, text102}
LText3alle: {text63, text73, text83, text93, text103}
indexcorrect1 = IndexOf(LText1alle(numText - 5), LText1)
indexcorrect2 = IndexOf(LText2alle(numText - 5), LText2)
indexcorrect3 = IndexOf(LText3alle(numText - 5), LText3)
index1 = SelectedIndex(LText1)
index2 = SelectedIndex(LText2)
index3 = SelectedIndex(LText3)
correct1: true
correct2: true
correct3 = true
text69b: "\textsf{" + (LaTeX[numA]) + " \cdot (" + (LaTeX[numB]) + " + " + (LaTeX[numC]) + ") ="
text8b: "\textsf{" + (LaTeX[numA]) + " + (" + (LaTeX[numB]) + " \cdot " + (LaTeX[numC]) + ") ="
g1 = true
g2 = true
g3 = true
Gesetz1: "" + (LaTeX[LGesetze(2)]) + ""
Gesetz2: "" + (LaTeX[LGesetze(3)]) + ""
Gesetz3: "" + (LaTeX[LGesetze(4)]) + ""
correcta = If(richtig, ja ∧ (¬nein), nein ∧ (¬ja))
step = 1
b: 2
c: 3
validatea = false
validateb = false
validatec = false
correctText1: "\text{" + (LaTeX[If[correcta, "✓ Richtig", "✘ Falsch"]]) + "}"
showsolutiona = false
showsolutionb = false
showsolutionc = false
rectangleCorrectb1, f, g, h, b_1 = Polygon(B + (widthB, 0), B + (widthB, heightB), B + (0, heightB), B)
rectangleCorrectb2, i, j, k, l = Polygon(B2 + (widthB2, 0), B2 + (widthB2, heightB), B2 + (0, heightB), B2)
rectangleCorrectb3, m, n, p, q = Polygon(B3 + (widthB3, 0), B3 + (widthB3, heightB), B3 + (0, heightB), B3)
text710b: "\textsf{(" + (LaTeX[numA]) + " + " + (LaTeX[numB]) + ") \cdot " + (LaTeX[numC]) + " ="
correctb: correct1 ∧ correct2 ∧ correct3
LGesetzeCorrect: {3, 3, 2, 2, 1, 3, 3, 3, 3, 3, 3}
indexcorrectc: LGesetzeCorrect(numText) + 1
correctc: indexc ≟ indexcorrectc
C = (-3.130804214177405, 2.5214546554315094)
widthC: LwidthC(indexc)
rectangleCorrectc, r, s, t, c_1 = Polygon(C + (widthC, 0), C + (widthC, heightB), C + (0, heightB), C)
numBC: (numB * numC)
D = (-4.919260955689994, 5.71632883838734)
E = (2.136118850277092, -0.14127718656678862)
solutionTextc: "\textsf{Lösung: " + (LaTeX[If[indexcorrectc ≟ 4, "Verteilungsgesetz (Distributivgesetz)", If[indexcorrectc ≟ 3, "Verbindungsgesetz (Assoziativgestz)", If[indexcorrectc ≟ 2, "Vertauschungsgesetz (Kommutativgesetz)"]]]]) + "}"
F = (-5.4238026511167075, 2.3021747642311463)
G = (-2.9503177540247614, 2.228339394168699)
PosText1 = (-5.073629515634483, 9.177124421204388)
H = (-4.75, 5.75)
e = OrthogonalLine(H, yAxis)
I = Point(e)
J = Point(e)
K = (4.332339791373371, 1.7620345750429507)
L = (5.352059412996973, 6.1593410587620125)
M = (8.178313300387277, 6.200360708796708)
BPos1 = (-0.6532173520819866, 6.750024019261587)
BPos2 = (5.630993033232883, 4.370884317249406)
BPos3 = (1.1352393894306003, 0.8760101342935811)
correctText2: "\textsf{\begin{array}{r}
                                 \\" + (LaTeX[If[(¬correctb) ∧ (correct1 ∨ correct2 ∨ correct3), "✘ Teilweise richtig", If[correctb, "✓ Richtig", "✘ Falsch"]]]) + "
\end{array}}"
correct: If[correcta, true, correctb] ∧ If[richtig, true, correctb] ∧ correcta
solutionTextb: "\text{
 " + (LaTeX[If[numText ∈ {6, 9}, ("" * Text1), If[numText ∈ {7, 10}, ("" * Text2), If[numText ≟ 8, ((((((((((((((((((("" * text8b) * "    ") * "") * numA) * " + ") * "") * numB) * " \cdot ") * "") * numC) * "    =   ") * "") * numA) * " + ") * "") * numBC) * "     =    ") * "") * (numA + (numB * numC)))]]]]) + "}"
solutionTexta: "\textsf{\vphantom{Äg}Lösung: 
\\\vphantom{Äg}Kathi hat " + (LaTeX[If[richtig, "richtig", "falsch"]]) + " gerechnet.
 " + (LaTeX[If[¬richtig, ("Die richtige Rechnung lautet:\\\vphantom{Äg}" * solutionTextb), ""]]) + ""
correctText3: "\textsf{\vphantom{Äg}" + (LaTeX[If[correctc, "✓ Richtig", "✘ Falsch"]]) + ""
Postxt00 = Point(xAxis)
f_1 = OrthogonalLine(Postxt00, xAxis)
Postxt01 = Point(f_1)
Postxt02 = Point(f_1)
Postxt03 = Point(f_1)
Postxt04 = Point(f_1)
Postxt05 = Point(f_1)
Postxt06 = Point(f_1)
ToolSettings = false
questionText2: "\textsf{" + (LaTeX[If[richtig, "Welches Rechengesetz wurde verwendet?", "Welches Rechengesetz hat Kathi versucht anzuwenden?"]]) + "}"
Text3: "\textsf{
\vphantom{Äg}" + (LaTeX[numA]) + " \cdot (" + (LaTeX[numB]) + " \cdot " + (LaTeX[numC]) + ")   =   (" + (LaTeX[numA]) + " \cdot " + (LaTeX[numB]) + ") \cdot " + (LaTeX[numC]) + "   =   " + (LaTeX[(numA * numB)]) + " \cdot " + (LaTeX[numC]) + "   =   " + (LaTeX[NumberSeparationComma[((numA * numB) * numC)]]) + ""
Text4: "\textsf{\vphantom{Äg}
(" + (LaTeX[numA]) + " \cdot " + (LaTeX[numB]) + ") \cdot " + (LaTeX[numC]) + "   =   " + (LaTeX[numA]) + " \cdot (" + (LaTeX[numB]) + " \cdot " + (LaTeX[numC]) + ")   =   " + (LaTeX[numA]) + " \cdot " + (LaTeX[(numB * numC)]) + "   =   " + (LaTeX[NumberSeparationComma[((numA * numB) * numC)]]) + ""
Text5: "\textsf{\vphantom{Äg}" + (LaTeX[numA]) + " \cdot " + (LaTeX[numB]) + "   =   " + (LaTeX[numB]) + " \cdot " + (LaTeX[numA]) + "   =   " + (LaTeX[(numA * numB)]) + ""
Text6: "\textsf{\vphantom{Äg}" + (LaTeX[numA]) + " \cdot (" + (LaTeX[numB]) + " + " + (LaTeX[numC]) + ")   =   " + (LaTeX[numA]) + " \cdot " + (LaTeX[numB]) + " \cdot " + (LaTeX[numA]) + " \cdot " + (LaTeX[numC]) + "   =   " + (LaTeX[(numA * numB)]) + " \cdot " + (LaTeX[(numA * numC)]) + "   =   " + (LaTeX[NumberSeparationComma[(((numA * numB) * numA) * numC)]]) + ""
Text7: "\textsf{\vphantom{Äg}
(" + (LaTeX[numA]) + " + " + (LaTeX[numB]) + ") \cdot " + (LaTeX[numC]) + "   =   " + (LaTeX[numA]) + " \cdot " + (LaTeX[numC]) + " \cdot " + (LaTeX[numB]) + " \cdot " + (LaTeX[numC]) + "   =   " + (LaTeX[(numA * numC)]) + " \cdot " + (LaTeX[(numB * numC)]) + "   =   " + (LaTeX[NumberSeparationComma[(((numA * numC) * numB) * numC)]]) + ""
Text8: "\textsf{\vphantom{Äg}" + (LaTeX[numA]) + " + (" + (LaTeX[numB]) + " \cdot " + (LaTeX[numC]) + ")   =   (" + (LaTeX[numA]) + " + " + (LaTeX[numB]) + ") \cdot (" + (LaTeX[numA]) + " + " + (LaTeX[numC]) + ")   =   " + (LaTeX[numA + numB]) + " \cdot " + (LaTeX[numA + numC]) + "   =   " + (LaTeX[NumberSeparationComma[((numA + numB) * (numA + numC))]]) + ""
Text9: "\textsf{\vphantom{Äg}" + (LaTeX[numA]) + " \cdot (" + (LaTeX[numB]) + " + " + (LaTeX[numC]) + ")   =   " + (LaTeX[numA]) + " \cdot " + (LaTeX[numB]) + " + " + (LaTeX[numC]) + "   =   " + (LaTeX[(numA * numB)]) + " + " + (LaTeX[numC]) + "   =   " + (LaTeX[NumberSeparationComma[(numA * numB) + numC]]) + ""
Text10: "\textsf{\vphantom{Äg}
(" + (LaTeX[numA]) + " + " + (LaTeX[numB]) + ") \cdot " + (LaTeX[numC]) + "   =   " + (LaTeX[numA]) + " + " + (LaTeX[numB]) + " \cdot " + (LaTeX[numC]) + "   =   " + (LaTeX[numA]) + " + " + (LaTeX[(numB * numC)]) + "   =   " + (LaTeX[numA + (numB * numC)]) + ""

Tool: NumberSeparationComma
NumberSeparationComma[ <Zahl> ]
Input: inputnumber
Output: outputtext

inputnumber: -1234.5678
inputtext: "" + inputnumber + ""
inputlist = Sequence(Take[inputtext, i, i], i, 1, Length[inputtext])
negativ: First[inputlist] ≟ {"-"}
comma = Defined(IndexOf[".", inputlist])
point = If(comma ≟ true, IndexOf[".", inputlist], Length[inputlist] + 1)
dezimal = Take(inputlist, point + 1)
prepend = Take(inputlist, If[negativ ≟ true, 2, 1], point - 1)
prependsep = Reverse(Join[Sequence[If[Mod[Length[prepend] - 2 - i, 3] ≟ 0, Append[Take[prepend, i, i], " "], Take[prepend, i, i]], i, Length[prepend], 1, -1]])
outputlist = RemoveUndefined(Join[{If[negativ ≟ true, {"-"}], If[First[prependsep] ≟ {" "}, Take[prependsep, 2], prependsep], If[comma ≟ true, Append[",", dezimal]]}])
outputtext = Take(Sum[Zip[f, f, outputlist]], 1)