Add and Subtract Integers with Counters by John Ulbright
Loading the math board and drawing, please wait…
This example demonstrates integer addition and subtraction using counters. Key mathematical concepts include operations with integers. It utilizes commands such as Flatten, Sequence, If, Textfield, and SelectedElement in GeoGebra. Suitable for upper elementary or middle school students learning integer operations.
GeoGebra Commands & Parameters
Flatten(Sequence[Sequence[Point[{i, (-j)}], i, 1 / 2, 1 / 2 + floor(sqrt(If[n1 < 0, (-n1) + n1AddedNegative, n1AddedNegative])), 1], j, 1 / 2, 1 / 2 + floor(sqrt(If[n1 < 0, (-n1) + n1AddedNegative, n1AddedNegative])), 1]) → negativePointsSequence(Max[abs(x(Element[negativePoints, i])), abs(y(Element[negativePoints, i]))], i, 1, Length[negativePoints]) → negativeSorterIf(Length[negativePoints] > 0, First[Sort[negativePoints, negativeSorter], Max[(-n1) + n1AddedNegative, n1AddedNegative]], {}) → sortedNegativePointsTextfield(n1text) → InputBox1Textfield(n2text) → InputBox2Flatten(Sequence[Sequence[Point[{i, j}], i, 1 / 2, 1 / 2 + floor(sqrt(If[n1 > 0, n1 + n1AddedPositive, n1AddedPositive])), 1], j, 1 / 2, 1 / 2 + floor(sqrt(If[n1 > 0, n1 + n1AddedPositive, n1AddedPositive])), 1]) → positivePointsSequence(Max[abs(x(Element[positivePoints, i])), abs(y(Element[positivePoints, i]))], i, 1, Length[positivePoints]) → positiveSorterIf(Length[positivePoints] > 0, First[Sort[positivePoints, positiveSorter], Max[n1 + n1AddedPositive, n1AddedPositive]], {}) → sortedPositivePointsIf(Length[sortedNegativePoints] > 0, Sequence[Circle[Element[sortedNegativePoints, i], 0.4], i, 1, Length[sortedNegativePoints]], {}) → negativeCirclesIf(Length[sortedPositivePoints] > 0, Sequence[Circle[Element[sortedPositivePoints, i], 0.4], i, 1, Length[sortedPositivePoints]], {}) → positiveCirclesIf((n1 * n2) < 0, Min[abs(n1), abs(n2)], 0) → extraZerosSelectedElement(addOrSub) → operationTextfield(n1Text) → InputBox3If(operation ≟ "+", n1 + n2, n1 - n2) → answerIf(Max[{n1, n2, answer}] > 0, Max[{n1, n2, answer}], 0) → highestPositiveIf(Min[{n1, n2, answer}] > 0, 0, Min[{n1, n2, answer}]) → lowestNegativeIf(highestPositive ≟ lowestNegative, 10, ceil(sqrt(highestPositive))) → topSequence(Text["+", Element[sortedPositivePoints, i] - (right / 50, (top + bottom) / 40)], i, 1, Length[sortedPositivePoints]) → plusSignsSequence(Text["-", Element[sortedNegativePoints, i] - (right / 65, (top + bottom) / 40)], i, 1, Length[sortedNegativePoints]) → minusSigns
AI Drawing Prompt Reference
Draw a number line with circles representing positive and negative numbers. First, generate circles for positive and negative numbers based on the input values and sort them by their absolute values. Then, calculate the result of addition or subtraction and represent it with a circle. Finally, label the positive circles with a plus sign and the negative circles with a minus sign.
The prompt above was compiled from the original drawing commands and is for reference only.