$\textsf{A}$

$\textsf{D}$

$\textsf{C}$

$\text{Überprüfen}$

$\text{Neuer Versuch}$

$\text{\bold{Neue Aufgabe}}$

\textsf\colorbox{ebe7f8}{A = \frac{(a + c) \cdot h}{2}

No selection allowed for all input boxes

Selection allowed for all input boxes

\textsf{Berechne die Längen der Seiten a und c und der Höhe h.\
Berechne dann den Flächeninhalt A des dargestellten Trapezes.}

Fix position and allow selection for all text objects

Empty all input boxes

\underline\text{Helper scripts for template}

\underline\text{Helper scripts for authors}

$\textsf{a = \vphantom{g}}$

$\textsf{c = \vphantom{g}}$

\textsf\colorbox{ebe7f8}{Du musst dein Ergebnis noch\durch 2 dividieren.

Auflösung X

Auflösung Y

DevReset

$\textsf{Nochmal!}$

$\textsf{B}$

\textsf{cm\vphantom{j}}

\textsf{cm\vphantom{j}}

\textsf{e}

\textsf{f}

$\textsf{A =\vphantom{g}}$

\textsf{\textsf\colorbox{ebe7f8}{Multipliziere dein Ergebnis\
noch mit der Länge der\Einheitsstrecke.

$\textsf{h}$

$\textsf{\bold\cdot}$

$\textsf{h = \vphantom{g}}$

\textsf{cm\vphantom{j}}

$\textsf\textcolor{}{a}$

$\textsf\textcolor{}{c}$

\textsf{∞

$\textsf{Lösung anzeigen}$

coordheight = 10 (slider from -5 to 20, step 1)
randomNosForH = Shuffle(Sequence[Random[3, coordheight - 4], m, 1, 100])
questionCount: 0
numH = Element(randomNosForH, Mod[questionCount, 100] + 1)
coordwidth = 12 (slider from -5 to 20, step 1)
randomNosForA = Shuffle(Sequence[Random[6, coordwidth - 2], m, 1, 100])
numA = Element(randomNosForA, Mod[questionCount, 100] + 1)
randomNosForC = Zip(Random[3, m - 1], m, randomNosForA)
numC = Element(randomNosForC, Mod[questionCount, 100] + 1)
input4 = NaN
eh: 1
sol: (((numA + numC) * numH) * 0.5)
solEH: (sol * eh)
size = 0.6 (slider from -5 to 5)
O = (-4.738774495537379, 2.123680874418485)
PA: O + (size * (1, 3))
randomNosForAbsLinks = Zip(Max[{0, Random[1, coordwidth - a - 3]}], a, randomNosForC)
absLinks: randomNosForAbsLinks(Mod[questionCount, 100] + 1)
PD: PA + (size * (absLinks, numH))
input3 = NaN
listEH = Join(Sequence[Shuffle[{2, 3, 4, 5}], m, 1, 30])
PC: PD + (size * (numC, 0))
es = Segment(PA, PC)
ez: Length[es] / size
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)
validate = false
showanswer = false
showsolution = false
attemptCount = 0 (slider from -5 to 5)
correctCount = 0 (slider from -5 to 5)
textCountCorrect: "\text{Richtig gelöste Aufgaben: " + (LaTeX[correctCount]) + " }"
showButtonNew = false
showButtonTryAgain = false
showButtonValidate = true
showhint = false
input1 = NaN
InputBox1 = Textfield(input1)
input2 = NaN
InputBox2 = Textfield(input2)
correct: input4 ≟ solEH
showcorrecttext = false
PtopLeftCornerFeedback = (-2.7265735779990843, 4.539173658288959)
PbottomRightCornerFeedback = (-0.9587831362975234, 1.3979460272654096)
PtopRightCornerFeedback: (x(PbottomRightCornerFeedback), y(PtopLeftCornerFeedback))
PbottomLeftCornerFeedback: (x(PtopLeftCornerFeedback), y(PbottomRightCornerFeedback))
rectangleCorrect, rectangleCorrectS3, rectangleCorrectS4, rectangleCorrectS2, rectangleCorrectS1 = Polygon(PtopLeftCornerFeedback, PtopRightCornerFeedback, PbottomRightCornerFeedback, PbottomLeftCornerFeedback)
showhinttypicalerror = false
allowCountIncrement = true
stayX = Append(true, Sequence[If[randomNosForA(i) ≟ randomNosForA(i - 1), false, true], i, 2, 100])
stayY = Append(true, Sequence[If[randomNosForC(i) ≟ randomNosForC(i - 1), false, true], i, 2, 100])
randomNosForXwithoutRepeat = Remove(Sequence[If[stayX(i), randomNosForA(i), 0], i, 1, 100], Sequence[0, i, 1, 100])
randomNosForYwithoutRepeat = Remove(Sequence[If[stayY(i), randomNosForC(i), 0], i, 1, 100], Sequence[0, i, 1, 100])
numXwithoutRepeat = Element(randomNosForXwithoutRepeat, Mod[questionCount, Length[randomNosForXwithoutRepeat]] + 1)
numYwithoutRepeat = Element(randomNosForYwithoutRepeat, Mod[questionCount, Length[randomNosForYwithoutRepeat]] + 1)
fixed = Defined(input4)
showbuttons: true
isFlink: true
tries: attemptCount
resx = 800 (slider from 0 to 1000, step 10)
resy = 675 (slider from 0 to 1000, step 10)
correctpartially: false
correctText: "\textsf{" + (LaTeX[If[correct, "\vphantom{✘}✓ Richtig", If[correctpartially, "\vphantom{✓}✘ Teilweise richtig", "\vphantom{✓}✘ Falsch"]]]) + ""
showButtonRestart = false
ResX: "|\\|" + (LaTeX[If[resy > 60, "\\|\\|\\|"]]) + "" + (LaTeX[If[resy > 150, "\\|\\|\\|"]]) + "" + (LaTeX[If[resy > 240, "\\|\\|\\|"]]) + "" + (LaTeX[If[resy > 330, "\\|\\|\\|"]]) + "" + (LaTeX[If[resy > 420, "\\|\\|\\|"]]) + "" + (LaTeX[If[resy > 510, "\\|\\|\\|"]]) + "" + (LaTeX[If[resy > 600, "\\|\\|\\|"]]) + "" + (LaTeX[If[resy > 690, "\\|\\|\\|"]]) + "" + (LaTeX[If[resy > 780, "\\|\\|\\|"]]) + "" + (LaTeX[If[resy > 870, "\\|\\|\\|"]]) + "" + (LaTeX[If[resy > 960, "\\|\\|"]]) + ""
ResY: "" + (If[resx > 0, "------------------", ""]) + "" + (If[resx > 100, "-----------------", ""]) + "" + (If[resx > 200, "----------------", ""]) + "" + (If[resx > 300, "-----------------", ""]) + "" + (If[resx > 400, "-----------------", ""]) + "" + (If[resx > 500, "----------------", ""]) + "" + (If[resx > 600, "-----------------", ""]) + "" + (If[resx > 700, "-----------------", ""]) + "" + (If[resx > 800, "----------------", ""]) + "" + (If[resx > 900, "-----------------", ""]) + ""
listPoints = Flatten(Sequence[Sequence[O + (m * (size, 0)) + (j * (0, size)), m, 0, coordwidth - 1], j, 0, coordheight - 1])
prop = Random(2, numA - 2)
PB: PA + (size * (numA, 0))
fs = Segment(PB, PD)
v1: {Polygon[PA, PD, PC, PB]}
fz: Length[fs] / size
G1: listPoints(coordwidth + 2)
G2: listPoints(coordwidth + 3)
g = Segment(G1, G2)
h = Translate(Segment[(0, -0.1), (0, 0.1)], G1)
i = Translate(Segment[(0, -0.1), (0, 0.1)], G2)
correct1: input1 ≟ (numA * eh)
correct2: input2 ≟ (numC * eh)
S = Intersect(Line[PA, PB], Line[PD, yAxis])
InputBox4 = Textfield(input4)
listCoords = Zip(Polygon[P, P + (0, size), P + (0, size) + (size, 0), P + (size, 0)], P, listPoints)
Text5: "\textsf\textcolor{db6114}{" + (LaTeX[eh]) + " cm}"
showhinttypicalerrorEH = false
f = Segment(PD, Intersect[Line[PD, yAxis], Line[PA, xAxis]])
α = Angle(PB, S, PD)
InputBox3 = Textfield(input3)
correct3: input3 ≟ numH
solutionText: "\text{Lösung:\\
A = \frac{(a + c) \cdot h}{2} = \frac{(" + (LaTeX[numA]) + " + " + (LaTeX[numC]) + ") \cdot " + (LaTeX[numH]) + "}{2} = \frac{" + (LaTeX[numA + numC]) + " \cdot " + (LaTeX[numH]) + "}{2} = \frac{" + (LaTeX[((numA + numC) * numH)]) + "}{2} = " + (LaTeX[ReplaceAll[("" * sol), ".", ","]]) + "\\\\
A = " + (LaTeX[ReplaceAll[("" * sol), ".", ","]]) + " cm²"
Text11: "\textsf{a = " + (LaTeX[numA]) + " cm \vphantom{g}"
Text12: "\textsf{c = " + (LaTeX[numC]) + " cm \vphantom{g}"
Text14: "\textsf{h = " + (LaTeX[numH]) + " cm \vphantom{g}"
isTypicalError: input4 ≟ (2 * sol)
isTypicalErrorEH: input4 ≟ sol ∧ eh ≠ 1
streckea = Segment(PA, PB)
streckec = Segment(PD, PC)
tabOrder: {InputBox1, InputBox2, InputBox3, InputBox4, btnValidate, btnTryAgain, btnNew}
l1: {Segment[PA, PB], Segment[PD, PC]}
attemptCount1 = 0
attemptCount2 = 0
showBtnSolution = false
attemptCount3 = 0
showsolution1 = false
showsolution2 = false
showsolution3 = false
fixedInput = false
Text10: "\textsf\textcolor{" + (LaTeX[If[fixedInput, "", "#888888"]]) + "}{cm²}"