Ordering Rational Numbers: Compare and Sort Positive, Negative, Decimals, and Fr

Ordering Rational Numbers: Compare and Sort Positive, Negative, Decimals, and Fr
Loading the math board and drawing, please wait…
2023-03-26 04:40
This GeoGebra activity demonstrates how to order rational numbers, including positive, negative, decimal, and fractional values. The core mathematical concept is comparing and sequencing rational numbers, emphasizing understanding their positions on the number line and conversions between different representations. The construction uses commands such as RandomUniform, Take, Zip, If, Sort, Sequence, IndexOf, RemoveUndefined, Polygon, centerBox, Segment, Corner, Dilate, and Element to generate random problem sets, create draggable boxes and points, and validate answers. It is designed for grades 6-8 students to practice comparing and ordering rational numbers with or without visual models, suitable for classroom instruction or independent practice.

GeoGebra Commands & Parameters

  1. RandomUniform(-0.99, 0.99, 200) → allRandoms1, {-0.871267331064494, 0.6479897657213198, -0.9845341371927736, -0.28114577546691855, 0.6706536068314761, -0.459477749454432, 0.4950921685292964, 0.8701476752168107, 0.6395431954419137, -0.16867864936613852, -0.8492249991598843, -0.9039547413489356, -0.82584539646152, 0.6355743971872849, -0.5866965272402633, -0.32441819105342284, -0.43247521670432176, 0.07384782586934868, -0.2785441764549488, -0.4316053175746094, 0.5870320470731585, -0.1836319458713459, 0.6521476112331666, -0.6293707073300625, 0.14357811841945578, 0.6445227750082514, 0.26244212439425163, 0.7841201680425303, -0.13918531955849178, 0.8308488913544958, 0.45859111303528954, 0.001159643339897598, 0.824299041479857, -0.44991780755832744, 0.7046760008163702, 0.12441075618839603, 0.39130322057186073, -0.5079725668051515, -0.9773030670353134, -0.1843561214039945, 0.7947163790992271, 0.31206606847396823, 0.5771096905498319, 0.4779710822383043, 0.5990688153244759, -0.692947183679913, 0.6798378655012622, -0.43587568004278676, 0.44317253707483584, 0.4231596748976112, 0.39668938785329, 0.06806934053023839, -0.8877885529303666, -0.8320883402262473, 0.40288468100856356, 0.5788680191961737, 0.6423304963402761, -0.20878545748120414, 0.3040557074264274, -0.20580163217026792, -0.12713805799078015, -0.4203889461843928, -0.5903976572300841, 0.6663126173574883, 0.2252922169777154, 0.6543082443593882, -0.5823049712940961, 0.6854588509148667, 0.9639126384949357, -0.8432953182764964, 0.14549006068262926, 0.2549145449175596, -0.5391878352234472, 0.6452021646454944, -0.12572386239686872, 0.19777452621063163, 0.9474600047143753, -0.8459775762277968, 0.6972982599193744, 0.05850856432651996, 0.006590832877777508, 0.9785570311549783, 0.21790670814382063, 0.542048656691988, -0.41855487062506747, 0.6324616166652, -0.7125421779270575, -0.27021168735666024, 0.23463257783770786, 0.7492654942992505, 0.9160434362378451, -0.8346291278790443, -0.024025052055555163, -0.8442996381058672, 0.19465528193162318, -0.44648322825616216, -0.8223482277264088, 0.30526060112623465, -0.2652088500967018, -0.6776162388978908, -0.05419044725530153, 0.22869160213138517, -0.9192111494195232, -0.1959232483749559, -0.9194877132242285, -0.4668395344818411, 0.7413242803609483, -0.031080769592772284, 0.41049955586792386, -0.01620218669908824, -0.5404607717334231, 0.806969856968988, -0.9843162130763388, -0.8298923860326677, -0.18383440948936847, -0.054986968340534736, -0.21134195815582535, 0.8554251642022395, -0.32320996653294665, -0.6811256382111861, 0.23670037441547387, -0.10983700159158316, -0.8469432008615011, 0.42940763310142627, -0.7321486701837341, -0.1809830529237627, -0.8318682916670378, -0.8841296999533556, 0.878604718849501, 0.3486138193370869, 0.7591545664081516, 0.04265232335845104, 0.7665930969023149, 0.1252656768171343, -0.006316405821534143, 0.7144419167752534, -0.3106369531067492, -0.17744569017894452, 0.7432873493614052, -0.7490896733865374, -0.30007396175389134, 0.9354027328339558, -0.05453118094771936, 0.9848666579697971, -0.7287652007750371, -0.2989004469812099, 0.73500640120377, -0.4624181986474797, 0.89507563018749, 0.9384255461039901, -0.24242447435894487, 0.25159976687474095, -0.1939185188887117, 0.5535905544264683, -0.1878337391732552, -0.8551474536461119, -0.6213396656733627, -0.9338787208177936, -0.07566025461162862, -0.8697357007253339, 0.47359918085238295, -0.08084854716327738, 0.10976855217154569, -0.4377223746207982, 0.9119423811020877, -0.3232534261031047, 0.746783786378467, -0.47414433032945913, 0.526459060675956, 0.4159566929216918, 0.37780336297944905, -0.18549078208569658, -0.7543960720269851, 0.37322247676909903, -0.07745566554284233, 0.9517702311549996, 0.4013400435249841, 0.6435687631330802, -0.22917695956831352, -0.3447219008037219, -0.179467283926534, 0.5167045151941414, 0.30952553659326343, -0.33573295487533594, -0.22016171938853135, -0.7332949848172263, 0.9869825109504315, -0.39026166283490094, -0.0438987614348636, -0.30861336388521254, -0.5914898994667939, 0.5819726534381895, -0.09176212603250467, -0.3962063475285176, 0.3892805043471772, 0.16228406374688342, 0.40242494601059997, -0.5686014770922978, -0.07503595144418318, 0.975037551841434}
  2. Take(allRandoms, randIndex, randIndex + numRandoms - 1) → currentRandomSeeds
  3. Zip(closestFraction[(n * 5), denominators], n, Take[currentRandomSeeds, 5, 8]) → problemListStart
  4. If(problemListStart ≟ Sort[problemListStart], Flatten[{Last[problemListStart, 2], First[problemListStart, 2]}], problemListStart) → problemList
  5. Sort(problemList) → answerList
  6. Zip(IndexOf[n, problemList], n, answerList) → correctOrder
  7. Sequence((x(CenterPoints(1)) + (1.25 * n), y(CenterPoints(1))) - (1.25 / 2, 0), n, 0, 4) → MidSnapPoints
  8. If(movingBox ≟ 1 ∨ movingBox ≟ 0 ∧ boxNum ≟ 1, x(ClosestPoint[MidSnapPoints, PointBox1]), x(ClosestPoint[CenterPoints, PointBoxDrag(1)])) → xInd1
  9. If(movingBox ≟ 2 ∨ movingBox ≟ 0 ∧ boxNum ≟ 2, x(ClosestPoint[MidSnapPoints, PointBox2]), x(ClosestPoint[CenterPoints, PointBoxDrag(2)])) → xInd2
  10. If(movingBox ≟ 3 ∨ movingBox ≟ 0 ∧ boxNum ≟ 3, x(ClosestPoint[MidSnapPoints, PointBox3]), x(ClosestPoint[CenterPoints, PointBoxDrag(3)])) → xInd3
  11. If(movingBox ≟ 4 ∨ movingBox ≟ 0 ∧ boxNum ≟ 4, x(ClosestPoint[MidSnapPoints, PointBox4]), x(ClosestPoint[CenterPoints, PointBoxDrag(4)])) → xInd4
  12. Sort({xInd1, xInd2, xInd3, xInd4}) → xIndOrdered
  13. IndexOf(xInd4, xIndOrdered) → ind4
  14. IndexOf(xInd3, xIndOrdered) → ind3
  15. IndexOf(xInd2, xIndOrdered) → ind2
  16. IndexOf(xInd1, xIndOrdered) → ind1
  17. Sequence(IndexOf[n, inds], n, 1, 4) → indOrder
  18. Zip(n ≟ m, n, correctOrder, m, indOrder) → correctByOrder
  19. RemoveUndefined(Sequence[If[correctByOrder(n), correctOrder(n)], n, 1, 4]) → greenInds
  20. Zip(IndexOf[n, indOrder], n, greenInds) → greenOrd
  21. Polygon({(-10, -10), (-10, -11), (-11, -11), (-11, -10)}) → box0
  22. centerBox(1.25, 1.25, PointBox4) → box4
  23. centerBox(1.25, 1.25, PointBox3) → box3
  24. centerBox(1.25, 1.25, PointBox2) → box2
  25. centerBox(1.25, 1.25, PointBox1) → box1
  26. Segment(StartNumLine + (0.5, 0), EndNumLine - (0.5, 0)) → segNumberArea
  27. Corner(sizePos, 4) → PointPos
  28. Corner(sizeNeg, 4) → PointNeg
  29. Segment(StartNumLine, EndNumLine) → numberLineSeg
  30. If(movingBox > 0, inds(movingBox), 0) → movingInd
  31. If(movingInd > 0, CenterPoints(movingInd), CenterPoints(1)) → PointHighlight
  32. Polygon(Zip[PixelsToPoint[Corner[1], Corner[3], Corner[5], A], A, {(pixelsLeft, pixelsTop), (pixelsLeft, y(Corner[5]) - pixelsBottom), Corner[5] - (pixelsRight, pixelsBottom), (x(Corner[5]) - pixelsRight, pixelsTop)}]) → borderBox
  33. Corner(5) → layoutAppSize
  34. Zip(Vector[PointSize, n], n, CornerSize) → cornerVectors
  35. centerBox(1.25, 1.25, CenterPoints(1)) → borderBox1
  36. centerBox(1.25, 1.25, CenterPoints(2)) → borderBox2
  37. centerBox(1.25, 1.25, CenterPoints(3)) → borderBox3
  38. centerBox(1.25, 1.25, CenterPoints(4)) → borderBox4
  39. Zip(¬(n ∈ CenterPoints), n, {PointBox1, PointBox2, PointBox3, PointBox4}) → boxesMoving
  40. centerBox(1.25, 1.25, PointHighlight) → borderHighlight1
  41. Sequence(StartNumLine + (0.5, 0) + ((n * (lenSeg - 2) / (dist - 1)), 0), n, 0, dist - 1) → PointNums
  42. Zip(Segment[n + (0, 0.12), n + (0, -0.12)], n, PointNums) → tickBig
  43. Sequence(StartNumLine + (0.5, 0) + ((n * (lenSeg - 2) / ((2 * (dist - 1)))), 0), n, 0, (2 * (dist - 1))) → PointMids
  44. Zip(Segment[n + (0, 0.1), n + (0, -0.1)], n, PointMids) → tickMid
  45. Sequence(StartNumLine + (0.5, 0) + ((n * (lenSeg - 2) / ((10 * (dist - 1)))), 0), n, 0, (10 * (dist - 1))) → PointSmalls
  46. Zip(Segment[n + (0, 0.05), n + (0, -0.05)], n, PointSmalls) → tickSmall
  47. Sequence(n, n, minNumLine, maxNumLine) → textNums
  48. Zip(Text[n, k - (0, 0.25) + If[n < 0, (((-oSizeNeg(2))) / 4, 0) + oSizeNeg(1), (((-oSizePos(2))) / 4, 0) + oSizePos(1)], true, true], n, textNums, k, PointNums) → textNumLine
  49. Zip(abs((minNumLine - n) / (dist - 1)), n, answerList) → ratioNums
  50. Zip(StartNumLine + (0.5, 0) + ((n * (lenSeg - 2)), 0), n, ratioNums) → PointsSolution
  51. Zip(textUnOrdered(n), n, correctOrder) → textOrdered
  52. Zip((((-x(solSizes(n)))) / 2, y(solSizes(n)) / 2), n, correctOrder) → positionsOrdered
  53. Sequence(If[showanswer ∨ showsolution ∨ validate ∧ correct, If[n ∈ greenInds, {210, 228, 226} / 255, {241, 210, 216} / 255], boxesMoving(n), {226, 223, 248} / 255, {238, 238, 238} / 255], n, 1, 4) → rgbInd
  54. Zip(StartNumLine + (0.5, 0) + ((n * (lenSeg - 2)), 0), n, ratioNums) → hintPoints
  55. Dilate({borderBox1, borderBox2, borderBox3, borderBox4}, 0.5, (0, -1.3)) → boxesSol
  56. Dilate(CenterPoints, 0.5, (0, -1.3)) → CenterSolutions
  57. Zip(Text[n, p + k - cornerVectors(1), true, true], n, textOrdered, p, CenterSolutions, k, positionsOrdered) → textSolNums
  58. Zip(n - (0, 1.25 / 4), n, CenterSolutions) → BottomSolutions
  59. Zip(n - (0, 1.25 / 2), n, CenterPoints) → BottomPoints
  60. Zip(Segment[n, m], n, If[validate ∧ correct, BottomPoints, BottomSolutions], m, PointsSolution) → solutionLines
  61. Element({box0, box1, box2, box3, box4}, movingBox + 1) → topBox
  62. If(movingBox > 0, PointTexts(movingBox), (-10, -10)) → PointPosition
  63. Sequence(If[showanswer ∨ showsolution ∨ validate ∧ correct, If[n ∈ greenOrd, {0, 103, 88} / 255, {176, 0, 32} / 255], {101, 87, 210} / 255], n, 1, 4) → outlineRGB
  64. Zip(problemText(n), n, inds) → readText

AI Drawing Prompt Reference

Draw an interactive graphic for practicing ordering rational numbers. The graphic includes a number line with tick marks and number labels. Above the number line are four draggable boxes, each representing a rational number problem (positive, negative, decimal, or fraction). Below the boxes are draggable points for placing answers. A sample box is also included. The number line extends with tick marks at both ends. At the bottom, text labels explain the sorting rules. The construction order is: generate a random list of rational numbers, create boxes and points, draw the number line, add ticks and labels, and finally add sorting indicators.
The prompt above was compiled from the original drawing commands and is for reference only.