Add and Subtract Integers with Counters

Add and Subtract Integers with Counters
Loading the math board and drawing, please wait…
2019-08-20 06:55
This example demonstrates integer addition and subtraction operations using visual counters. It involves core math concepts like integers, addition/subtraction rules, and number line representation. The construction utilizes commands such as Flatten, Sequence, If, and Textfield, along with objects like n2text and sliders (addStep2mover, subStep1mover), to create an interactive learning tool. Ideal for middle school mathematics education to enhance understanding of abstract arithmetic operations.

GeoGebra Commands & Parameters

  1. 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]) → negativePoints
  2. Sequence(Max[abs(x(Element[negativePoints, i])), abs(y(Element[negativePoints, i]))], i, 1, Length[negativePoints]) → negativeSorter
  3. If(Length[negativePoints] > 0, First[Sort[negativePoints, negativeSorter], Max[(-n1) + n1AddedNegative, n1AddedNegative]], {}) → sortedNegativePoints
  4. Textfield(n1text) → InputBox1
  5. Textfield(n2text) → InputBox2
  6. Flatten(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]) → positivePoints
  7. Sequence(Max[abs(x(Element[positivePoints, i])), abs(y(Element[positivePoints, i]))], i, 1, Length[positivePoints]) → positiveSorter
  8. If(Length[positivePoints] > 0, First[Sort[positivePoints, positiveSorter], Max[n1 + n1AddedPositive, n1AddedPositive]], {}) → sortedPositivePoints
  9. If(Length[sortedNegativePoints] > 0, Sequence[Circle[Element[sortedNegativePoints, i], 0.4], i, 1, Length[sortedNegativePoints]], {}) → negativeCircles
  10. If(Length[sortedPositivePoints] > 0, Sequence[Circle[Element[sortedPositivePoints, i], 0.4], i, 1, Length[sortedPositivePoints]], {}) → positiveCircles
  11. If((n1 * n2) < 0, Min[abs(n1), abs(n2)], 0) → extraZeros
  12. SelectedElement(addOrSub) → operation
  13. Textfield(n1Text) → InputBox3
  14. If(operation ≟ "+", n1 + n2, n1 - n2) → answer
  15. If(Max[{n1, n2, answer}] > 0, Max[{n1, n2, answer}], 0) → highestPositive
  16. If(Min[{n1, n2, answer}] > 0, 0, Min[{n1, n2, answer}]) → lowestNegative
  17. If(highestPositive ≟ lowestNegative, 10, ceil(sqrt(highestPositive))) → top
  18. Sequence(Text["+", Element[sortedPositivePoints, i] - (right / 50, (top + bottom) / 40)], i, 1, Length[sortedPositivePoints]) → plusSigns
  19. Sequence(Text["-", Element[sortedNegativePoints, i] - (right / 65, (top + bottom) / 40)], i, 1, Length[sortedNegativePoints]) → minusSigns

AI Drawing Prompt Reference

Create an interactive diagram for demonstrating integer addition and subtraction, featuring positive and negative counter points, an operation selector, input boxes, and result display. Positive and negative counter points dynamically generate based on input integers, sorted by size, and represented as circles. The operation selector allows choosing addition or subtraction, which calculates the result based on input integers, marking the counter points with plus or minus signs on a number line. Input boxes show the entered integers, and the result display shows the computed outcome, arranged clearly for educational purposes.
The prompt above was compiled from the original drawing commands and is for reference only.