Rational Numbers on a Number Line

Rational Numbers on a Number Line
Loading the math board and drawing, please wait…
2020-11-01 19:51
This example demonstrates the positions of rational numbers on a number line by dragging them to the correct positions. Key mathematical concepts include rational numbers and their representation on a number line. GeoGebra commands used include RandomElement, If, Polygon, Segment, FractionText, Random, and Sort. Suitable for middle school and above students to learn about rational numbers.

GeoGebra Commands & Parameters

  1. RandomElement({2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12}) → Cdenom
  2. If(Cdenom ≟ 2, Random[-20, 20, true], If[Cdenom ≟ 3, Random[-30, 30, true], If[Cdenom ≟ 4, Random[-40, 40, true], If[Cdenom ≟ 5, Random[-50, 50, true], If[Cdenom ≟ 6, Random[-60, 60, true], If[Cdenom ≟ 7, Random[-70, 70, true], If[Cdenom ≟ 8, Random[-80, 80, true], If[Cdenom ≟ 9, Random[-90, 90, true], If[Cdenom ≟ 10, Random[-100, 100, true], If[Cdenom ≟ 11, Random[-110, 110, true], If[Cdenom ≟ 12, Random[-120, 120, true]]]]]]]]]]]) → Cnum
  3. Polygon(I, W, V, J) → poly1, i, w, v, j
  4. Polygon(J, V, U, K) → poly2, j_1, v_1, u, k
  5. Polygon(K, U, T, L) → poly3, k_1, u_1, t, l
  6. Polygon(L, T, S, M) → poly4, l_1, t_1, s, m
  7. Segment(H, G) → c
  8. Segment(G, Z) → d
  9. Segment(Z, E) → e
  10. Segment(E, F) → f
  11. FractionText(C) → Cfancy
  12. RandomElement({2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12}) → Ddenom
  13. RandomElement({-9, -8, -7, -6, -5, -4, -3, -2, -1, 1, 2, 3, 4, 5, 6, 7, 8, 9}) → Dwhole
  14. Random(1, Ddenom - 1, true) → Dnum
  15. FractionText(Dnum / Ddenom) → Dfancy
  16. If(Dwhole < 0, Dwhole - Dnum / Ddenom, Dwhole + Dnum / Ddenom) → D
  17. Segment(A_1, Aact) → aerr
  18. Segment(B_1, Bact) → berr
  19. Segment(C_1, Cact) → cerr
  20. Segment(D_1, Dact) → derr
  21. Sort({A, B, C, D}) → test
  22. Sort({x(A_1), x(B_1), x(C_1), x(D_1)}) → test2
  23. If(IndexOf[A, Sort[{A, B, C, D}]] ≟ IndexOf[x(A_1), Sort[{x(A_1), x(B_1), x(C_1), x(D_1)}]], 1) → orderA
  24. If(IndexOf[B, Sort[{A, B, C, D}]] ≟ IndexOf[x(B_1), Sort[{x(A_1), x(B_1), x(C_1), x(D_1)}]], 1) → orderB
  25. If(IndexOf[C, Sort[{A, B, C, D}]] ≟ IndexOf[x(C_1), Sort[{x(A_1), x(B_1), x(C_1), x(D_1)}]], 1) → orderC
  26. If(IndexOf[D, Sort[{A, B, C, D}]] ≟ IndexOf[x(D_1), Sort[{x(A_1), x(B_1), x(C_1), x(D_1)}]], 1) → orderD

AI Drawing Prompt Reference

Draw a horizontal number line with four draggable fraction labels, each corresponding to a target position point. The line is divided into equal segments, each marked by a colored rectangular region to aid placement. Each fraction is randomly generated with a numerator and denominator, displayed in fraction form. The four fractions must be arranged from left to right by value; after dragging, the system checks if each fraction is at the correct position, and draws line segments from the labels to their target points to show errors. The figure includes the number line, tick marks, fraction labels, target points, error segments, and sorting indicators.
The prompt above was compiled from the original drawing commands and is for reference only.