Ordering Rational Numbers: Compare and Sort Positive, Negative, Decimals, and Fr
Loading the math board and drawing, please wait…
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
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}Take(allRandoms, randIndex, randIndex + numRandoms - 1) → currentRandomSeedsZip(closestFraction[(n * 5), denominators], n, Take[currentRandomSeeds, 5, 8]) → problemListStartIf(problemListStart ≟ Sort[problemListStart], Flatten[{Last[problemListStart, 2], First[problemListStart, 2]}], problemListStart) → problemListSort(problemList) → answerListZip(IndexOf[n, problemList], n, answerList) → correctOrderSequence((x(CenterPoints(1)) + (1.25 * n), y(CenterPoints(1))) - (1.25 / 2, 0), n, 0, 4) → MidSnapPointsIf(movingBox ≟ 1 ∨ movingBox ≟ 0 ∧ boxNum ≟ 1, x(ClosestPoint[MidSnapPoints, PointBox1]), x(ClosestPoint[CenterPoints, PointBoxDrag(1)])) → xInd1If(movingBox ≟ 2 ∨ movingBox ≟ 0 ∧ boxNum ≟ 2, x(ClosestPoint[MidSnapPoints, PointBox2]), x(ClosestPoint[CenterPoints, PointBoxDrag(2)])) → xInd2If(movingBox ≟ 3 ∨ movingBox ≟ 0 ∧ boxNum ≟ 3, x(ClosestPoint[MidSnapPoints, PointBox3]), x(ClosestPoint[CenterPoints, PointBoxDrag(3)])) → xInd3If(movingBox ≟ 4 ∨ movingBox ≟ 0 ∧ boxNum ≟ 4, x(ClosestPoint[MidSnapPoints, PointBox4]), x(ClosestPoint[CenterPoints, PointBoxDrag(4)])) → xInd4Sort({xInd1, xInd2, xInd3, xInd4}) → xIndOrderedIndexOf(xInd4, xIndOrdered) → ind4IndexOf(xInd3, xIndOrdered) → ind3IndexOf(xInd2, xIndOrdered) → ind2IndexOf(xInd1, xIndOrdered) → ind1Sequence(IndexOf[n, inds], n, 1, 4) → indOrderZip(n ≟ m, n, correctOrder, m, indOrder) → correctByOrderRemoveUndefined(Sequence[If[correctByOrder(n), correctOrder(n)], n, 1, 4]) → greenIndsZip(IndexOf[n, indOrder], n, greenInds) → greenOrdPolygon({(-10, -10), (-10, -11), (-11, -11), (-11, -10)}) → box0centerBox(1.25, 1.25, PointBox4) → box4centerBox(1.25, 1.25, PointBox3) → box3centerBox(1.25, 1.25, PointBox2) → box2centerBox(1.25, 1.25, PointBox1) → box1Segment(StartNumLine + (0.5, 0), EndNumLine - (0.5, 0)) → segNumberAreaCorner(sizePos, 4) → PointPosCorner(sizeNeg, 4) → PointNegSegment(StartNumLine, EndNumLine) → numberLineSegIf(movingBox > 0, inds(movingBox), 0) → movingIndIf(movingInd > 0, CenterPoints(movingInd), CenterPoints(1)) → PointHighlightPolygon(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)}]) → borderBoxCorner(5) → layoutAppSizeZip(Vector[PointSize, n], n, CornerSize) → cornerVectorscenterBox(1.25, 1.25, CenterPoints(1)) → borderBox1centerBox(1.25, 1.25, CenterPoints(2)) → borderBox2centerBox(1.25, 1.25, CenterPoints(3)) → borderBox3centerBox(1.25, 1.25, CenterPoints(4)) → borderBox4Zip(¬(n ∈ CenterPoints), n, {PointBox1, PointBox2, PointBox3, PointBox4}) → boxesMovingcenterBox(1.25, 1.25, PointHighlight) → borderHighlight1Sequence(StartNumLine + (0.5, 0) + ((n * (lenSeg - 2) / (dist - 1)), 0), n, 0, dist - 1) → PointNumsZip(Segment[n + (0, 0.12), n + (0, -0.12)], n, PointNums) → tickBigSequence(StartNumLine + (0.5, 0) + ((n * (lenSeg - 2) / ((2 * (dist - 1)))), 0), n, 0, (2 * (dist - 1))) → PointMidsZip(Segment[n + (0, 0.1), n + (0, -0.1)], n, PointMids) → tickMidSequence(StartNumLine + (0.5, 0) + ((n * (lenSeg - 2) / ((10 * (dist - 1)))), 0), n, 0, (10 * (dist - 1))) → PointSmallsZip(Segment[n + (0, 0.05), n + (0, -0.05)], n, PointSmalls) → tickSmallSequence(n, n, minNumLine, maxNumLine) → textNumsZip(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) → textNumLineZip(abs((minNumLine - n) / (dist - 1)), n, answerList) → ratioNumsZip(StartNumLine + (0.5, 0) + ((n * (lenSeg - 2)), 0), n, ratioNums) → PointsSolutionZip(textUnOrdered(n), n, correctOrder) → textOrderedZip((((-x(solSizes(n)))) / 2, y(solSizes(n)) / 2), n, correctOrder) → positionsOrderedSequence(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) → rgbIndZip(StartNumLine + (0.5, 0) + ((n * (lenSeg - 2)), 0), n, ratioNums) → hintPointsDilate({borderBox1, borderBox2, borderBox3, borderBox4}, 0.5, (0, -1.3)) → boxesSolDilate(CenterPoints, 0.5, (0, -1.3)) → CenterSolutionsZip(Text[n, p + k - cornerVectors(1), true, true], n, textOrdered, p, CenterSolutions, k, positionsOrdered) → textSolNumsZip(n - (0, 1.25 / 4), n, CenterSolutions) → BottomSolutionsZip(n - (0, 1.25 / 2), n, CenterPoints) → BottomPointsZip(Segment[n, m], n, If[validate ∧ correct, BottomPoints, BottomSolutions], m, PointsSolution) → solutionLinesElement({box0, box1, box2, box3, box4}, movingBox + 1) → topBoxIf(movingBox > 0, PointTexts(movingBox), (-10, -10)) → PointPositionSequence(If[showanswer ∨ showsolution ∨ validate ∧ correct, If[n ∈ greenOrd, {0, 103, 88} / 255, {176, 0, 32} / 255], {101, 87, 210} / 255], n, 1, 4) → outlineRGBZip(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.