Snail Race - Integer Addition & Subtraction
Loading the math board and drawing, please wait…
In collections
Addieren und Subtrahieren von ganzen und rationalen Zahlen
This example demonstrates a dynamic snail race simulation using integer addition and subtraction to model the race progress. Core math concepts include integer arithmetic, sequence generation, and conditional logic. Construction highlights involve GeoGebra commands and objects like Textfield, Segment, Polygon, OrthogonalLine, Sequence, If, Defined, Shuffle, Flatten, Split, CountIf to create the ra
GeoGebra Commands & Parameters
Textfield(input) → InputBoxSegment((0, 0.7), (40, 0.7)) → fSegment((0, -9.3), (40, -9.3)) → gPolygon(E, F, G, H) → v1, e, f_1, g_1, hOrthogonalLine(A_1, xAxis) → iSequence(Translate[Element[salat1, i], Vector[SalatPos1 + ((i - 1) * (dxFolge, 0))]], i, 1, 3) → showSalat1Sequence(Translate[Element[salat2, i], Vector[SalatPos2 + ((i - 1) * (dxFolge, 0))]], i, 1, 3) → showSalat2Sequence(Translate[Element[salat3, i], Vector[SalatPos3 + ((i - 1) * (dxFolge, 0))]], i, 1, 3) → showSalat3If(turboschnecke, 1 / 6, regenbogenschnecke, (1 / 6 * 0.8), (1 / 6 * 0.6)) → speed2Defined(input) → fixedShuffle(Sequence[Random[2, 6], i, 1, 50]) → randomZahl3Nenner, {3, 6, 5, 3, 5, 4, 2, 2, 4, 4, 2, 2, 3, 6, 5, 6, 6, 4, 4, 5, 2, 4, 3, 3, 5, 6, 5, 2, 6, 3, 5, 6, 2, 4, 4, 5, 4, 5, 2, 3, 4, 6, 2, 6, 5, 3, 2, 3, 5, 5}Flatten(Sequence[Shuffle[1…4], k, 1, 50]) → VRAuswahl1Flatten(Sequence[Shuffle[1…4], k, 1, 50]) → VRAuswahl2Flatten(Sequence[Shuffle[1…4], k, 1, 50]) → VRAuswahl3Shuffle(Sequence[Random[1, 10], i, 1, 50]) → randomZahl11, {2, 8, 9, 10, 3, 5, 3, 4, 3, 3, 2, 8, 5, 9, 7, 1, 1, 1, 6, 8, 2, 7, 2, 4, 9, 7, 9, 4, 8, 1, 9, 3, 10, 3, 9, 6, 2, 10, 2, 5, 8, 8, 10, 10, 2, 2, 2, 1, 4, 2}Shuffle(Sequence[Random[1, 10], i, 1, 50]) → randomZahl12, {3, 2, 3, 10, 3, 1, 8, 7, 1, 5, 6, 9, 6, 3, 2, 5, 6, 4, 5, 10, 6, 8, 10, 6, 5, 5, 5, 10, 9, 3, 10, 6, 5, 9, 4, 1, 3, 3, 9, 8, 1, 7, 1, 5, 10, 9, 6, 3, 4, 1}Shuffle(Sequence[Random[1, 10], i, 1, 50]) → randomZahl13, {7, 7, 10, 1, 9, 3, 9, 9, 9, 4, 1, 6, 5, 4, 1, 5, 7, 10, 7, 2, 6, 2, 7, 9, 8, 7, 9, 5, 3, 10, 6, 10, 2, 1, 5, 7, 4, 4, 2, 9, 7, 8, 1, 6, 10, 5, 10, 4, 2, 9}Sequence(RandomElement[1…2], i, 1, 50) → random5050, {1, 1, 2, 1, 1, 2, 1, 2, 2, 1, 2, 2, 2, 1, 1, 2, 1, 2, 1, 1, 1, 1, 1, 2, 1, 2, 2, 2, 2, 2, 1, 2, 2, 2, 1, 2, 2, 2, 1, 2, 1, 2, 2, 2, 1, 1, 2, 1, 1, 1}Shuffle(Sequence[RandomElement[(0…49) \ {0, -10, 10, -20, 20, -30, 30, -40, 40}] / 10, i, 1, 55]) → randomZahl212, {2.2, 1.9, 1.7, 2.9, 1.2, 1.2, 3.9, 2.2, 0.6, 0.9, 2.7, 1.9, 4.8, 4.2, 1.4, 1.1, 3.4, 2.9, 4.4, 3.4, 0.3, 1.9, 1.3, 4.1, 3.1, 0.1, 4.4, 2.6, 1.9, 0.7, 4.7, 1.7, 4.8, 4.6, 2.7, 3.2, 4.8, 0.1, 2.1, 4.1, 3.9, 1.5, 0.9, 2.9, 1.9, 1.7, 1.1, 4.8, 3.8, 2.8, 1.4, 4.5, 2.8, 0.2, 2.3}Shuffle(Sequence[RandomElement[(1…10) \ {10}] / 10, i, 1, 55]) → randomZahl211, {0.5, 0.7, 0.7, 0.4, 0.7, 0.7, 0.5, 0.2, 0.6, 0.9, 0.2, 0.7, 0.8, 0.5, 0.7, 0.6, 0.9, 0.1, 0.3, 0.1, 0.8, 0.1, 0.4, 0.4, 0.4, 0.8, 0.5, 0.4, 0.4, 0.4, 0.5, 0.5, 0.3, 0.7, 0.6, 0.2, 0.1, 0.6, 0.5, 0.9, 0.1, 0.9, 0.8, 0.1, 0.6, 0.1, 0.1, 0.1, 0.8, 0.3, 0.4, 0.9, 0.6, 0.3, 0.2}If(random5050(beispiel) ≟ 1, randomZahl211, randomZahl212) → randomZahl21Shuffle(Sequence[RandomElement[(1…10) \ {10}] / 10, i, 1, 55]) → randomZahl22, {0.3, 0.2, 0.7, 0.8, 0.5, 0.9, 0.1, 0.5, 0.1, 0.4, 0.2, 0.8, 0.1, 0.1, 0.4, 0.8, 0.2, 0.2, 0.3, 0.1, 0.2, 0.3, 0.5, 0.2, 0.3, 0.8, 0.6, 0.7, 0.4, 0.8, 0.9, 0.7, 0.9, 0.2, 0.8, 0.3, 0.6, 0.2, 0.1, 0.1, 0.2, 0.1, 0.9, 0.7, 0.1, 0.6, 0.4, 0.2, 0.7, 0.9, 0.8, 0.9, 0.9, 0.6, 0.7}Shuffle(Sequence[Random[1, 2], i, 1, 100]) → randomPosition2, {2, 1, 2, 1, 1, 1, 1, 1, 1, 2, 1, 2, 1, 1, 1, 2, 2, 1, 1, 1, 1, 2, 1, 1, 2, 2, 1, 2, 2, 2, 2, 1, 1, 1, 2, 1, 1, 1, 2, 2, 2, 1, 1, 1, 2, 1, 2, 2, 1, 2, 1, 1, 2, 1, 2, 2, 2, 1, 2, 1, 2, 2, 1, 1, 2, 1, 2, 2, 1, 2, 1, 1, 1, 2, 2, 2, 2, 1, 2, 2, 2, 2, 1, 2, 1, 2, 1, 2, 2, 1, 1, 1, 1, 1, 2, 2, 1, 1, 1, 1}If(random5050(beispiel) ≟ 1, solution21, solution22) → solution2Sequence(If[randomZahl3Nenner(i) ≟ 2, Random[1, 2], randomZahl3Nenner(i) ≟ 3, Random[1, 3], randomZahl3Nenner(i) ≟ 4, Random[1, 4], randomZahl3Nenner(i) ≟ 5, Random[1, 5], randomZahl3Nenner(i) ≟ 6, Random[1, 6]], i, 1, 50) → randomZahl3Zähler1Sequence(If[randomZahl3Nenner(i) ≟ 2, Random[1, 2], randomZahl3Nenner(i) ≟ 3, Random[1, 3], randomZahl3Nenner(i) ≟ 4, Random[1, 4], randomZahl3Nenner(i) ≟ 5, Random[1, 5], randomZahl3Nenner(i) ≟ 6, Random[1, 6]], i, 1, 50) → randomZahl3Zähler2Flatten(Sequence[Shuffle[1…3], k, 1, 50]) → randomQuestionTypeIf(questionType ≟ 1, solution1, questionType ≟ 2, solution2, solution3) → solutionSplit(Text[InputBox], {""}) → inputKeysCountIf(x ≟ " ", inputKeys) → NumOfLeerIf(questionType ≟ 3, NumOfLeer ≤ 2, NumOfLeer ≟ 0) → correctKeysCountIf(x ≟ "+", inputKeys) → NumOfPlusCountIf(x ≟ "-", inputKeys) → NumOfMinusCountIf(x ≟ "/", inputKeys) → NumOfDurchCountIf(x ≟ "*", inputKeys) → NumOfMal