Money Changer: Evenly Split Amount into Wallets
Loading the math board and drawing, please wait…
In collections
Dividieren durch eine einstellige Zahl
① This example demonstrates a money‑changer machine that evenly splits a given amount into several wallets. ② Core mathematical concepts include integer division, equal‑distribution algorithms, sequence generation, and minimum value search. ③ Construction highlights: the applet employs GeoGebra commands Join, If, Flatten, Translate, Sequence, Polygon, CountIf, Min, Textfield, Shuffle, Element, Append, Point, Length, Zip together with objects such as showButtonValidateGrauAfterTryAgain, startpage, questionCount, listNumBeutel, numBeutel to create an interactive distribution process. ④ Suitable for upper‑primary to lower‑secondary arithmetic lessons, as well as for teaching algorithmic thinking and GeoGebra scripting.
GeoGebra Commands & Parameters
Join({{5}, Shuffle[Sequence[1, maxexnum] \ {5}], Join[Sequence[Shuffle[Sequence[1, maxexnum]], m, 1, floor(110 / maxexnum)]]}) → listExNumsIf(startpage, 9, listExNums(Mod[questionCount, 100] + 1)) → exnumFlatten(Sequence[Sequence[BagPoint + (m * (bagsizex + 0.1, 0)) + (j * (0, bagsizey + 0.1)), m, 0, 2], j, 0, 2]) → listBagPointsTranslate(Polygon[(0, 0), (bagsizex, 0), (bagsizex, bagsizey), (0, bagsizey)], listBagPoints(9)) → v9Translate(Polygon[(0, 0), (bagsizex, 0), (bagsizex, bagsizey), (0, bagsizey)], listBagPoints(8)) → v8Translate(Polygon[(0, 0), (bagsizex, 0), (bagsizex, bagsizey), (0, bagsizey)], listBagPoints(7)) → v7Translate(Polygon[(0, 0), (bagsizex, 0), (bagsizex, bagsizey), (0, bagsizey)], listBagPoints(6)) → v6Translate(Polygon[(0, 0), (bagsizex, 0), (bagsizex, bagsizey), (0, bagsizey)], listBagPoints(5)) → v5Translate(Polygon[(0, 0), (bagsizex, 0), (bagsizex, bagsizey), (0, bagsizey)], listBagPoints(4)) → v4Translate(Polygon[(0, 0), (bagsizex, 0), (bagsizex, bagsizey), (0, bagsizey)], listBagPoints(3)) → v3Translate(Polygon[(0, 0), (bagsizex, 0), (bagsizex, bagsizey), (0, bagsizey)], listBagPoints(2)) → v2Translate(Polygon[(0, 0), (bagsizex, 0), (bagsizex, bagsizey), (0, bagsizey)], listBagPoints(1)) → v1Sequence(Element[{inV1, inV2, inV3, inV4, inV5, inV6, inV7, inV8, inV9}, m], m, 1, numBeutel) → listVsPolygon(V01, (x(V01), y(V02)), V02, (x(V02), y(V01))) → v0, f, g, h, kCountIf(P ∈ v0, P, RemoveUndefined[{MG1, MG2, MG3, MG4, MG5, MG6, MG7, MG8, MG9, MG10, MG11, MG12, MG13, MG14, MG15, MG16, MG17, MG18, MG19, MG20, MG21, MG22}]) → inv02CountIf(P ∈ v0, P, RemoveUndefined[{MH1, MH2, MH3, MH4, MH5, MH6, MH7, MH8, MH9, MH10, MH11, MH12, MH13, MH14, MH15, MH16, MH17, MH18, MH19, MH20, MH21, MH22}]) → inv01CountIf(P ∈ v0, P, RemoveUndefined[{MF1, MF2, MF3, MF4, MF5, MF6, MF7, MF8, MF9, MF10, MF11, MF12, MF13, MF14, MF15, MF16, MF17, MF18, MF19, MF20, MF21, MF22}]) → inv05CountIf(P ∈ v0, P, RemoveUndefined[{ME1, ME2, ME3, ME4, ME5, ME6, ME7, ME8, ME9, ME10, ME11, ME12, ME13, ME14, ME15, ME16, ME17, ME18, ME19, ME20, ME21, ME22, ME23, ME24, ME25, ME26, ME27}]) → inv010CountIf(P ∈ v0, P, RemoveUndefined[{MD1, MD2, MD3, MD4, MD5, MD6, MD7, MD8, MD9, MD10, MD11, MD12, MD13, MD14, MD15, MD16, MD17, MD18, MD19, MD20, MD21, MD22, MD23, MD24, MD25, MD26, MD27}]) → inv020CountIf(P ∈ v0, P, RemoveUndefined[{MC1, MC2, MC3, MC4, MC5, MC6, MC7, MC8, MC9, MC10, MC11, MC12}]) → inv050CountIf(P ∈ v0, P, RemoveUndefined[{MB1, MB2, MB3, MB4, MB5, MB6, MB7}]) → inv0100CountIf(P ∈ v0, P, RemoveUndefined[{MA1, MA2, MA3, MA4, MA5, MA6}]) → inv0200Polygon(PBild1, (x(PBild1), y(PBild2)), PBild2, (x(PBild2), y(PBild1))) → vBild, a_1, i, b_2, jIf(b ≟ 1, Min[{floor(num / 200), max200}], 0) → num200If(b ≤ 2, Min[{floor((num - (num200 * 200)) / 100), max100}], 0) → num100If(b ≤ 3, Min[{floor((num - (num200 * 200) - (num100 * 100)) / 50), max50}], 0) → num50If(b ≤ 4, Min[{floor((num - (num200 * 200) - (num100 * 100) - (num50 * 50)) / 20), max20}], 0) → num20If(b ≤ 5, Min[{floor((num - (num200 * 200) - (num100 * 100) - (num50 * 50) - (num20 * 20)) / 10), max10}], 0) → num10If(b ≤ 6, Min[{floor((num - (num200 * 200) - (num100 * 100) - (num50 * 50) - (num20 * 20) - (num10 * 10)) / 5), max5}], 0) → num5If(b ≤ 7, Min[{floor((num - (num200 * 200) - (num100 * 100) - (num50 * 50) - (num20 * 20) - (num10 * 10) - (num5 * 5)) / 2), max2}], 0) → num2Min({floor((num - (num200 * 200) - (num100 * 100) - (num50 * 50) - (num20 * 20) - (num10 * 10) - (num5 * 5) - (num2 * 2)) / 1), max1}) → num1Textfield(input1) → Eingabefeld1Textfield(input2) → Eingabefeld2Polygon(PtopLeftCornerFeedback, PtopRightCornerFeedback, PbottomRightCornerFeedback, PbottomLeftCornerFeedback) → rectangleCorrect, rectangleCorrectS3, rectangleCorrectS4, rectangleCorrectS2, rectangleCorrectS1Shuffle(Sequence[Random[0, 10], i, 1, 100]) → randomNosForX, {1, 1, 3, 1, 3, 1, 9, 6, 4, 6, 10, 2, 3, 2, 1, 10, 8, 8, 10, 7, 7, 1, 7, 9, 0, 2, 10, 6, 5, 3, 3, 5, 8, 3, 2, 5, 4, 7, 0, 1, 3, 0, 6, 1, 0, 3, 2, 9, 5, 6, 2, 0, 0, 10, 3, 9, 0, 7, 1, 3, 5, 0, 6, 7, 0, 10, 9, 10, 9, 5, 2, 9, 4, 0, 4, 3, 7, 2, 3, 7, 8, 9, 2, 3, 2, 1, 1, 10, 7, 6, 2, 5, 3, 4, 5, 1, 3, 6, 7, 0}Shuffle(Sequence[Random[0, 10], i, 1, 100]) → randomNosForY, {4, 1, 5, 7, 7, 9, 3, 4, 7, 9, 5, 5, 9, 4, 8, 5, 0, 5, 9, 4, 9, 3, 0, 0, 8, 4, 7, 10, 7, 0, 5, 5, 9, 4, 5, 4, 5, 9, 10, 2, 4, 0, 6, 9, 0, 3, 3, 7, 10, 1, 5, 0, 9, 10, 3, 4, 8, 0, 10, 2, 10, 0, 9, 0, 10, 4, 5, 3, 4, 2, 7, 3, 3, 6, 2, 6, 3, 4, 7, 10, 9, 2, 0, 0, 2, 0, 4, 3, 6, 2, 10, 5, 7, 6, 8, 9, 10, 9, 1, 4}Element(randomNosForY, Mod[questionCount, 100] + 1) → numYAppend(true, Sequence[If[randomNosForX(i) ≟ randomNosForX(i - 1), false, true], i, 2, 100]) → stayXPoint(Line[Maschine1, xAxis]) → Maschine2Textfield(num) → Eingabefeld0Flatten(Sequence[Sequence[PC + (m * (absscheinex, 0)) - (j * (0, (0.8 * absscheiney))), j, 0, 8], m, 0, 2]) → listPCLength(listPC) → lengthPCSequence(listPC(m), m, 1, listChange(2)) → listPC200Sequence(Element[Remove[listPC, listPC200], m], m, 1, listChange(3)) → listPC100Sequence(Element[Remove[listPC, Join[{listPC200, listPC100}]], m], m, 1, listChange(4)) → listPC50Sequence(Element[Remove[listPC, Join[{listPC200, listPC100, listPC50}]], m], m, 1, listChange(5)) → listPC20Sequence(Element[Remove[listPC, Join[{listPC200, listPC100, listPC50, listPC20}]], m], m, 1, listChange(6)) → listPC10Sequence(Element[Remove[listPC, Join[{listPC200, listPC100, listPC50, listPC20, listPC10}]], m], m, 1, listChange(7)) → listPC5Sequence(Element[Remove[listPC, Join[{listPC200, listPC100, listPC50, listPC20, listPC10, listPC5}]], m], m, 1, listChange(8)) → listPC2Sequence(Element[Remove[listPC, Join[{listPC200, listPC100, listPC50, listPC20, listPC10, listPC5, listPC2}]], m], m, 1, listChange(9)) → listPC1Flatten(Sequence[Sequence[PS + (m * (absscheinex + 0.2, 0)) - (j * (0, (1.4 * picheight200))), j, 0, 1], m, 0, 3]) → listPSSequence(listPS(m), m, 1, listStart(1)) → listPS200Sequence(Element[Remove[listPS, listPS200], m], m, 1, listStart(2)) → listPS100CountIf(P ∈ vBild, P, RemoveUndefined[{MH1, MH2, MH3, MH4, MH5, MH6, MH7, MH8, MH9, MH10, MH11, MH12, MH13, MH14, MH15, MH16, MH17, MH18, MH19, MH20, MH21, MH22}]) → inBild1CountIf(P ∈ vBild, P, RemoveUndefined[{MF1, MF2, MF3, MF4, MF5, MF6, MF7, MF8, MF9, MF10, MF11, MF12, MF13, MF14, MF15, MF16, MF17, MF18, MF19, MF20, MF21, MF22}]) → inBild5CountIf(P ∈ vBild, P, RemoveUndefined[{ME1, ME2, ME3, ME4, ME5, ME6, ME7, ME8, ME9, ME10, ME11, ME12, ME13, ME14, ME15, ME16, ME17, ME18, ME19, ME20, ME21, ME22, ME23, ME24, ME25, ME26, ME27}]) → inBild10CountIf(P ∈ vBild, P, RemoveUndefined[{MD1, MD2, MD3, MD4, MD5, MD6, MD7, MD8, MD9, MD10, MD11, MD12, MD13, MD14, MD15, MD16, MD17, MD18, MD19, MD20, MD21, MD22, MD23, MD24, MD25, MD26, MD27}]) → inBild20CountIf(P ∈ vBild, P, RemoveUndefined[{MC1, MC2, MC3, MC4, MC5, MC6, MC7, MC8, MC9, MC10, MC11, MC12}]) → inBild50CountIf(P ∈ vBild, P, RemoveUndefined[{MB1, MB2, MB3, MB4, MB5, MB6, MB7}]) → inBild100CountIf(P ∈ vBild, P, RemoveUndefined[{MA1, MA2, MA3, MA4, MA5, MA6}]) → inBild200CountIf(P ∈ vBild, P, RemoveUndefined[{MG1, MG2, MG3, MG4, MG5, MG6, MG7, MG8, MG9, MG10, MG11, MG12, MG13, MG14, MG15, MG16, MG17, MG18, MG19, MG20, MG21, MG22}]) → inBild2Polygon(VA1, (x(VA1), y(VA2)), VA2, (x(VA2), y(VA1))) → vAusgabe, va1, l, va2, mCountIf(Defined[P] ∧ P ∈ vAusgabe, P, {MA1, MA2, MA3, MA4, MA5, MA6, MB1, MB2, MB3, MB4, MB5, MB6, MB7, MC1, MC2, MC3, MC4, MC5, MC6, MC7, MC8, MC9, MC10, MC11, MC12, MD1, MD2, MD3, MD4, MD5, MD6, MD7, MD8, MD9, MD10, MD11, MD12, MD13, MD14, MD15, MD16, MD17, MD18, MD19, MD20, MD21, MD22, MD23, MD24, MD25, MD26, MD27, ME1, ME2, ME3, ME4, ME5, ME6, ME7, ME8, ME9, ME10, ME11, ME12, ME13, ME14, ME15, ME16, ME17, ME18, ME19, ME20, ME21, ME22, ME23, ME24, ME25, ME26, ME27, MF1, MF2, MF3, MF4, MF5, MF6, MF7, MF8, MF9, MF10, MF11, MF12, MF13, MF14, MF15, MF16, MF17, MF18, MF19, MF20, MF21, MF22, MG1, MG2, MG3, MG4, MG5, MG6, MG7, MG8, MG9, MG10, MG11, MG12, MG13, MG14, MG15, MG16, MG17, MG18, MG19, MG20, MG21, MG22, MH1, MH2, MH3, MH4, MH5, MH6, MH7, MH8, MH9, MH10, MH11, MH12, MH13, MH14, MH15, MH16, MH17, MH18, MH19, MH20, MH21, MH22}) → inVAusgabeCountIf(P ∈ vBild, P, RemoveUndefined[{MB6, MB7}]) → inBild100StartCountIf(P ∈ vBild, P, RemoveUndefined[{ME26, ME27}]) → inBild10StartCountIf(P ∈ vBild, P, RemoveUndefined[{MH21, MH22}]) → inBild1StartCountIf(P ∈ vBild, P, RemoveUndefined[{MA4, MA5, MA6}]) → inBild200StartCountIf(P ∈ vBild, P, RemoveUndefined[{MD26, MD27}]) → inBild20StartCountIf(P ∈ vBild, P, RemoveUndefined[{MG21, MG22}]) → inBild2StartCountIf(P ∈ vBild, P, RemoveUndefined[{MC11, MC12}]) → inBild50StartCountIf(P ∈ vBild, P, RemoveUndefined[{MF21, MF22}]) → inBild5StartZip((numBeutel * m), m, listSol) → listSolNumsSequence(listBagPoints(1) + ((0.3 * bagsizex), (0.5 * bagsizey) - (m * 0.3)), m, 0, Sum[listSol]) → listSolPoints1Sequence(listBagPoints(2) + ((0.3 * bagsizex), (0.5 * bagsizey) - (m * 0.3)), m, 0, Sum[listSol]) → listSolPoints2Sequence(listBagPoints(3) + ((0.3 * bagsizex), (0.5 * bagsizey) - (m * 0.3)), m, 0, Sum[listSol]) → listSolPoints3Sequence(listBagPoints(4) + ((0.3 * bagsizex), (0.5 * bagsizey) - (m * 0.3)), m, 0, Sum[listSol]) → listSolPoints4Sequence(listBagPoints(5) + ((0.3 * bagsizex), (0.5 * bagsizey) - (m * 0.3)), m, 0, Sum[listSol]) → listSolPoints5Sequence(listBagPoints(6) + ((0.3 * bagsizex), (0.5 * bagsizey) - (m * 0.3)), m, 0, Sum[listSol]) → listSolPoints6Sequence(listBagPoints(7) + ((0.3 * bagsizex), (0.5 * bagsizey) - (m * 0.3)), m, 0, Sum[listSol]) → listSolPoints7Sequence(listBagPoints(8) + ((0.3 * bagsizex), (0.5 * bagsizey) - (m * 0.3)), m, 0, Sum[listSol]) → listSolPoints8Sequence(listBagPoints(9) + ((0.3 * bagsizex), (0.5 * bagsizey) - (m * 0.3)), m, 0, Sum[listSol]) → listSolPoints9Sequence(listBagPoints(3) + (3 + (0.3 * bagsizex), (0.5 * bagsizey) - (m * 0.3)), m, 0, Sum[listSol]) → listSolPointsRestFlatten(Sequence[Sequence[PRest + (m * ((1.2 * absscheiney), 0)) + (j * (0, absscheiney)), m, 0, 7], j, 0, 20]) → listRestPointsLength(listRestPoints) → aPolygon(VVB1, (x(VVB2), y(VVB1)), VVB2, (x(VVB1), y(VVB2))) → vForbidden, vfb1, n, vfb2, pSequence(Element[Remove[listPS, Join[{listPS200, listPS100}]], m], m, 1, listStart(3)) → listPS50Sequence(Element[Remove[listPS, Join[{listPS200, listPS100, listPS50}]], m], m, 1, listStart(4)) → listPS20Sequence(Element[Remove[listPS, Join[{listPS200, listPS100, listPS50, listPS20}]], m], m, 1, listStart(5)) → listPS10Sequence(Element[Remove[listPS, Join[{listPS200, listPS100, listPS50, listPS20, listPS10}]], m], m, 1, listStart(6)) → listPS5Sequence(Element[Remove[listPS, Join[{listPS200, listPS100, listPS50, listPS20, listPS10, listPS5}]], m], m, 1, listStart(7)) → listPS2Sequence(Element[Remove[listPS, Join[{listPS200, listPS100, listPS50, listPS20, listPS10, listPS5, listPS2}]], m], m, 1, listStart(8)) → listPS1Sequence(Element[Zip[Text["\textsf\small{" + correctValue + ((" €" * "}")), P + (1.33, 2), true, true, -0, 1], P, listBagPoints], m], m, 1, numBeutel) → listSolText
AI Drawing Prompt Reference
Draw a money changer machine that evenly distributes a given amount into several wallets. Start by drawing the machine's appearance, including 9 wallets, each made up of four points. Then, based on the input amount, calculate the amount to be distributed to each wallet and allocate it accordingly. Finally, use text fields to display the input amount and polygons to represent each wallet.
The prompt above was compiled from the original drawing commands and is for reference only.