Double Number Line for Percent Change

Double Number Line for Percent Change
Loading the math board and drawing, please wait…
2017-11-16 03:36
This example demonstrates a double number line for percent change, ranging from 0 to 200%. Users can adjust the whole value range from 0.1 to 100. GeoGebra commands such as If, Point, Segment, Textfield are used to dynamically show the process of percent change. Suitable for middle school and above students to learn about percent change.

GeoGebra Commands & Parameters

  1. If(q2 < 100, 100, If[q2 < 500, 10, 1]) → roundingFactorDNL2values
  2. Point(Segment[(0, 0.85), (4.3, 0.85)]) → slidePt
  3. If(q2 ≥ 0 ∧ q2 ≤ 0.1, 0.1, round((roundingFactorDNL2values * q2)) / roundingFactorDNL2values) → q2rnd
  4. If(q1 < 100, 100, If[q1 < 500, 10, 1]) → roundingFactorDNL1values
  5. If(q1 ≥ 0 ∧ q1 ≤ 0.1, 0.1, If[q1 < 25, round((100 * q1)) / 100, If[q1 < 75, round((10 * q1)) / 10, If[q1 > 100, 100, round(q1)]]]) → q1rnd
  6. Segment(A, DNL2ArrowPt) → lineDNL1
  7. Segment(B, DNL1ArrowPt) → lineDNL2
  8. If(hatchMinor ≟ 3 ∨ hatchMinor ≟ 6 ∨ hatchMinor ≟ 7 ∨ hatchMinor ≟ 9, -0.2, -0.15) → topxOffSet
  9. Textfield(q2labelForLengthAlwaysShow) → q2blabelInput
  10. Segment(slidePt + (0, 1.7), slidePt - (0, 1.75)) → slideSeg
  11. Text(0, (x(A) - 0.035, y(A) - (1.7 * yOffSet))) → zeroDNL2
  12. Sequence(((length * k), 0), k, 0, 4, 2) → hashMajorDNL2
  13. Sequence(((length * k), h), k, 0, 4, 2) → hashMajorDNL1
  14. Sequence((k, h), k, 0, 4.3, ((2 * length)) / hatchMinor) → hashMinorDNL1
  15. Sequence((k, 0), k, 0, 4.3, ((2 * length)) / hatchMinor) → hashMinorDNL2
  16. Text("0%", (x(B) - 0.087, y(B) + yOffSet)) → zeroDNL1
  17. Sequence(Text[(50 * q) + "%", ((length * q) + topxOffSet, y(B) + yOffSet)], q, If[hatchMinor ≟ 7 ∨ hatchMinor ≟ 9, 6 / hatchMinor, If[hatchMinor ≤ 5, 2 / hatchMinor, 4 / hatchMinor]], If[hatchMinor ≟ 3 ∨ hatchMinor ≟ 6 ∨ hatchMinor ≟ 9, 3.5, 4], If[hatchMinor ≟ 7 ∨ hatchMinor ≟ 9, 6 / hatchMinor, If[hatchMinor ≤ 5, 2 / hatchMinor, 4 / hatchMinor]]) → hashMarkValuesTextDNL1
  18. Polygon((1.5, 1.9), (2.2, 1.9), (2.2, 2.3), (1.5, 2.3)) → dnl1HatchMinorHide, f, g, i, j
  19. Sequence(Text[((0.5 * p) * q2), ((length * p) + xOffSet, y(A) - (1.7 * yOffSet))], p, If[hatchMinor ≟ 7 ∨ hatchMinor ≟ 9, 6 / hatchMinor, If[hatchMinor ≤ 5, 2 / hatchMinor, 4 / hatchMinor]], 4, If[hatchMinor ≟ 7 ∨ hatchMinor ≟ 9, 6 / hatchMinor, If[hatchMinor ≤ 5, 2 / hatchMinor, 4 / hatchMinor]]) → hashMarkValuesTextDNL2
  20. Mirror(dnl1HatchMinorHide, y = h / 2) → dnl2HatchMinorHide
  21. Vector(((2 * length), (0.5 * h)), If[slidePtMovedCk, slidePt - (0.03, 0), slidePt + (0.5, 0)]) → markUpArrow
  22. Vector(((2 * length), (0.5 * h)), If[slidePtMovedCk, slidePt + (0.03, 0), slidePt - (0.5, 0)]) → markDownArrow
  23. Textfield(q2inputTextToParse) → q2avalueInput
  24. Textfield(locationXq2InputTextToParse) → locationXq2Input
  25. Textfield(locationXq1InputTextToParse) → locationXq1Input