Multi-Digit Subtraction with Regrouping Practice

Multi-Digit Subtraction with Regrouping Practice
Loading the math board and drawing, please wait…
2023-07-01 00:31
This interactive GeoGebra activity demonstrates multi-digit subtraction with regrouping (borrowing). It randomly generates two multi-digit numbers and guides students through the subtraction process using the regrouping methodais. The core mathematical concept is place value and the borrowing algorithm in vertical subtraction. The construction uses commands such as RandomUniform, Sequence, Take, Zip, Flatten, Min, Length, expandedFormList, If, Max, Last, KeepIf, First, Midpoint, Textfield, Polygon, Corner, TableText, and PixelsToPoint to generate random digits, display expanded forms, and create interactive input fields and visual aids. It is designed for grades 4-5, suitable for classroom practice or self-study, and includes support for word problems and a Spanish translation.

GeoGebra Commands & Parameters

  1. RandomUniform(0, 0.99, 200) → allRandomSeeds, {0.6765099860589153, 0.2448906804719003, 0.965743662417109, 0.2700257935952639, 0.795603742092831, 0.18431861691713627, 0.9556890809533629, 0.6785957971735536, 0.47987926486332855, 0.2659917016360184, 0.6247586318271333, 0.7268310742277345, 0.0536008671884054, 0.7222673436693376, 0.8758357303442527, 0.841332385290648, 0.8642404583747006, 0.25348809985682497, 0.9262655468250942, 0.6533776313809219, 0.9240942421099986, 0.009915685044977382, 0.2697690182421031, 0.7328890288295509, 0.49136171092191294, 0.8702096185985724, 0.4804263281111081, 0.22731813835436213, 0.09640656615894279, 0.7600101700271955, 0.04417123111262404, 0.06728377604898082, 0.7951598788545767, 0.17440921012151328, 0.2818219617935929, 0.7471171744755178, 0.5500532745333303, 0.3980050875692775, 0.8634458247741386, 0.8094741278188502, 0.7994852361642794, 0.4458370970995477, 0.9768133744745555, 0.6288672671195586, 0.41962647901983563, 0.13778222139284443, 0.2828446652800553, 0.8493528044136188, 0.9873604641121773, 0.9379714530212493, 0.4782845062919538, 0.436673700972073, 0.3103326454305722, 0.8594451788023019, 0.030364026338105306, 0.2149180576615274, 0.67944783126232, 0.8926166011295132, 0.9499161868214598, 0.012194009964114193, 0.2807072521816503, 0.8441492741234046, 0.4083082007992278, 0.538953870389301, 0.3570173823490501, 0.7705797533603029, 0.7696388028376981, 0.7164181152534663, 0.526530238679826, 0.7684278130446397, 0.6129187023080517, 0.5210563476796649, 0.8121902267797292, 0.7896371521553631, 0.789412753769247, 0.30427485503181223, 0.24746520024698956, 0.8179757901018093, 0.25796777450243585, 0.27434207706967434, 0.16572976732936293, 0.06850059972900124, 0.005984691223554408, 0.870151112942159, 0.3154462636421543, 0.7683520152342334, 0.6057146337945756, 0.9636744302838373, 0.9301548196829516, 0.9129952155355825, 0.5547682064926909, 0.05990937202302385, 0.7613356072867707, 0.2675603349774407, 0.2961227426848774, 0.2497437680319011, 0.9334476625361596, 0.2581596204240087, 0.6064973681002017, 0.34248948052747374, 0.18387546436405383, 0.7629712223833854, 0.4127365322650348, 0.1408374245763089, 0.5761306369867655, 0.027478967789562277, 0.5238014708809159, 0.10168090647408379, 0.472457786804316, 0.8625444381134317, 0.3111164240671128, 0.5416354999838697, 0.7319848733809433, 0.10796254391069651, 0.36234947979079907, 0.8461510238674396, 0.6827351649165273, 0.9278137933846747, 0.5332299134444224, 0.5458683293905744, 0.5001841521326319, 0.2572759520970404, 0.7087127143405736, 0.7333156705648748, 0.7815962618149179, 0.2735949311210103, 0.668697704786411, 0.06717151704867991, 0.3041178233555574, 0.8766396544687214, 0.2845940281918776, 0.2901378083939857, 0.5855293795290686, 0.2968771043569987, 0.07129318445466037, 0.5899746921519107, 0.2396760057323325, 0.7507042326687905, 0.8245719191685629, 0.9214401640699491, 0.2538976151003215, 0.37485972810051144, 0.6765934029979169, 0.10975957178883287, 0.6532703182373943, 0.0031136176275427096, 0.2820083626753632, 0.8038178806712054, 0.036148758860248334, 0.34959495661697576, 0.5241805237560518, 0.3495236576699713, 0.29736390359166376, 0.9239670258603321, 0.21526820631447663, 0.9307371246072056, 0.1894836808609246, 0.8941968926914857, 0.4952916512482578, 0.03678523311554704, 0.528784137211107, 0.5628907712808506, 0.9838990883420102, 0.6619054786827646, 0.25100655680676354, 0.23307852593402278, 0.49431579730136005, 0.7429655812652918, 0.5025910945521296, 0.9089306383789459, 0.211920152943246, 0.9875000440644964, 0.0658802442692488, 0.7861773976160189, 0.16003631874981322, 0.5544846737071255, 0.24177576807803985, 0.3559758898559794, 0.3228677947372728, 0.30533956119873373, 0.2705104482012354, 0.9446307129236909, 0.6300172527398942, 0.5924058743063402, 0.0005610403648394991, 0.6899259412423079, 0.5087471849348015, 0.426585816015751, 0.1772819496517835, 0.8928611415268487, 0.16903211212798272, 0.14496581154310198, 0.4265789693821649, 0.7213103404014838, 0.2225378041836353, 0.18306094388876154, 0.16487036704847452, 0.1595339019553315, 0.4799333088428205, 0.9748254288326283}
  2. Sequence(qCoordX + 80 + (52.5 * n), n, 0, 4) → qCoordsX, {130, 182.5, 235, 287.5, 340}
  3. Take(allRandomSeeds, randIndex, randIndex + numRandoms - 1) → currentRandomSeeds
  4. Zip(1 + floor((A * 9)), A, Take[currentRandomSeeds, 3, 3 + numDigits1 - 1]) → digitsNum1Start
  5. Zip(1 + floor((A * 9)), A, Take[currentRandomSeeds, 3 + numDigits1 - 1, 3 + numDigits1 + numDigits2 - 2]) → digitsNum2Start
  6. Flatten({If[digitsNum1Start(1) ≠ digitsNum2Start(1), Min[digitsNum1Start(1), digitsNum2Start(1)], digitsNum1Start(1) - 1], Max[digitsNum1Start(2), digitsNum2Start(2)], Take[digitsNum1Start, 3]}) → digitsNum1
  7. Flatten({Max[digitsNum1Start(1), digitsNum2Start(1)], If[digitsNum1Start(2) ≠ digitsNum2Start(2), Min[digitsNum1Start(2), digitsNum2Start(2)], digitsNum1Start(2) - 1], Take[digitsNum2Start, 3]}) → digitsNum2
  8. Min(nums) → num2
  9. Length(Text[num2]) → digitMin
  10. expandedFormList(num2) → num2Expanded
  11. If(digitMin > 4, num2Expanded(digitMin - 4), 0) → A2
  12. If(digitMin > 3, num2Expanded(digitMin - 3), 0) → B2
  13. Max(nums) → num1
  14. Length(Text[num1]) → digitMax
  15. Sequence((floor(num1 / 10^(digitMax - n)) * 10^(digitMax - n)) - (floor(num1 / 10^(digitMax - n + 1)) * 10^(digitMax - n + 1)), n, 1, digitMax) → num1Expanded, {90000, 2000, 800, 70, 8}
  16. If(F4 < F2, E1 - 10^(E3), E1) → E4
  17. If(E4 < E2, E4 + 10^(E3 + 1), E4) → E5
  18. If(digitMax > 3, num1Expanded(digitMax - 3), 0) → B1
  19. If(digitMax > 4, num1Expanded(digitMax - 4), 0) → A1
  20. If(E4 < E2, D1 - 10^(D3), D1) → D4
  21. If(D4 < D2, D4 + 10^(D3 + 1), D4) → D5
  22. Last(startNum1List, digitMax) → num1ListInput
  23. If(D4 < D2, C1 - 10^(C3), C1) → C4
  24. If(C4 < C2, C4 + 10^(C3 + 1), C4) → C5
  25. If(C4 < C2, B1 - 10^(B3), B1) → B4
  26. If(B4 < B2, B4 + 10^(B3 + 1), B4) → B5
  27. If(B4 < B2, A1 - 10^(A3), A1) → A4
  28. If(A4 < A2, A4 + 10^(A3 + 1), A4) → A5
  29. Last(startTops, digitMax) → Tops
  30. KeepIf(k > 0, k, Sequence[If[num1ListInput(n) ≠ Tops(n), n, 0], n, 1, digitMax]) → allCancel
  31. Zip(PixelsToPoint[Corner[1], Corner[3], Corner[5], (qCoordsX(n) + 16.5, qCoordY + 35)], n, allCancel) → OnboardingPoints
  32. Length(Tops) → lenTops
  33. Max(RemoveUndefined[Sequence[If[¬(boolColorTop(n)), n], n, 1, lenTops]]) → topLastIncorrect
  34. Sequence(If[n ≟ topLastIncorrect, true, false], n, 1, 5) → hintColorTop
  35. Zip(n ∧ k, n, hintColorTop, k, numFill) → boolTopBox
  36. Last(startAnswers, digitMax) → Answers
  37. Length(Answers) → lenAnswer
  38. Max(RemoveUndefined[Sequence[If[¬(boolColorBottom(n)), n], n, 1, lenAnswer]]) → bottomLastIncorrect
  39. First({inputTop1, inputTop2, inputTop3, inputTop4, inputTop5}, digitMax) → startInputTops
  40. Zip(If[Defined[n], n, k], n, startInputTops, k, num1ListInput) → inputTops
  41. If(Defined[num1ListInput(bottomLastIncorrect)], {num1ListInput(bottomLastIncorrect), Tops(bottomLastIncorrect), inputTops(bottomLastIncorrect)}, {0, 0, 0}) → cancelCurrent
  42. If(Defined[num1ListInput(bottomLastIncorrect + 1)], {num1ListInput(bottomLastIncorrect + 1), Tops(bottomLastIncorrect + 1), inputTops(bottomLastIncorrect + 1)}, {-1, -1, -1}) → cancelNext
  43. If(Defined[topLastIncorrect], num1ListInput(topLastIncorrect), 0) → num1T1
  44. Last(Flatten[{Sequence[0, n, 1, 5 - digitMin], Sequence[num2Expanded(n) / 10^(digitMin - n), n, 1, digitMin]}], digitMax) → num2ListNums
  45. If(Defined[num2ListNums(bottomLastIncorrect)], num2ListNums(bottomLastIncorrect), 0) → num2ValCurrent
  46. If(Defined[num2ListNums(bottomLastIncorrect + 1)], num2ListNums(bottomLastIncorrect + 1), -1) → num2ValNext
  47. If(Defined[num1ListInput(bottomLastIncorrect - 1)], {num1ListInput(bottomLastIncorrect - 1), Tops(bottomLastIncorrect - 1), inputTops(bottomLastIncorrect - 1), num2ListNums(bottomLastIncorrect - 1)}, {100, 100, 100, 100}) → cancelBefore
  48. If(¬Defined[bottomLastIncorrect], 7, If[num1CC2 ≟ num1CC3, If[num1CN2 ≟ num1CN3, 3, 1], num1CC2 ≟ num1CC3 - 1, 6, num1CC2 ≟ num1CC3 + 1 ∨ num1CC3 ≟ num1CC2 + 10, 8, num1CN1 ≟ num1CN2, 2, num1CB1 < num2CB4, 4, 5]) → answerCase
  49. If(answerCase ≟ 1, num2ValNext, num2ValCurrent) → num2Val
  50. If(cancelNext(2) ≟ cancelNext(3), cancelNext(1), cancelCurrent(1)) → num1ValNext_{1}
  51. Max(Sequence[If[num1ListInput(n) ≠ Tops(n), n, 0], n, 1, digitMax]) → maxCancel
  52. Flatten({"", Answers}) → numAnswerList
  53. Flatten({"", Zip[If[n ≟ k, "", "" + (k)], n, num1ListInput, k, Tops]}) → num1Tops
  54. First({input1, input2, input3, input4, input5}, digitMax) → inputAnswers
  55. Flatten({Zip[n ≟ k, n, inputAnswers, k, Answers], Last[{false, false, false, false, false}, 5 - lenAnswer]}) → topValidateAns
  56. Flatten({"", Zip[If[n ≟ k, "" + (k), "\cancel{" + (k) + "}"], k, num1ListInput, n, Tops]}) → num1Cancel
  57. Zip(If[n, "#8CBAB4", "#DB8C9A"], n, boolColorBottom) → colorsBottomSol
  58. Sequence(If[Defined[bottomLastIncorrect] ∧ n < bottomLastIncorrect, true, boolColorBottom(n)], n, 1, 5) → boolColorBottomHint
  59. Sequence(If[boolColorBottomHint(n), If[n > bottomLastIncorrect, "#8CBAB4", "#ffffff"], "#E6B08C"], n, 1, 5) → colorsBottomHint
  60. Flatten({Sequence[0, n, 1, 5 - digitMax], Sequence[num1Expanded(n) / 10^(digitMax - n), n, 1, digitMax]}) → num1ListNums
  61. Flatten({"-", Sequence["", n, 1, digitMax - digitMin], Sequence[num2Expanded(n) / 10^(digitMin - n), n, 1, digitMin]}) → num2Sub
  62. Sequence(If[hintColorValidate(n), "#C75000", "#252525"], n, 1, 5) → hintColors
  63. Flatten({Sequence["", n, 1, 5 - digitMax], Sequence[num1Expanded(n) / 10^(digitMax - n), n, 1, digitMax]}) → num1List
  64. Sequence(Corner[textnum1a, n], n, 1, 4) → CornersOnboarding
  65. Midpoint(CornersOnboarding(1), CornersOnboarding(3)) → InputPoint
  66. Flatten({Sequence["", n, 1, 5 - digitMin], Sequence[num2Expanded(n) / 10^(digitMin - n), n, 1, digitMin]}) → num2List
  67. Flatten({Sequence[0, n, 1, digitMax - digitMin], num2Expanded}) → num2Expanded0
  68. Flatten({inputAnswers, inputTops}) → inputCurrent
  69. Textfield(input1) → InputBox1
  70. Textfield(input2) → InputBox2
  71. 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
  72. Corner(5) → layoutAppSize
  73. onboardingTextOffset(Corner[onboardingText, 1], Corner[onboardingText, 3], onboardingCase, Corner[1], Corner[3], Corner[5]) → OnboardingTextOffset
  74. If(E4 ≠ E1, If[E5 ≠ E4, 2, 1], E5 ≠ E4, 1, 0) → E6
  75. If(E4 ≠ E1, If[E5 ≠ E4, 2, 1], E5 ≠ E4, 1, 0) → A6
  76. If(B4 ≠ B1, If[B5 ≠ B4, 2, 1], B5 ≠ B4, 1, 0) → B6
  77. If(C4 ≠ C1, If[C5 ≠ C4, 2, 1], C5 ≠ C4, 1, 0) → C6
  78. If(D4 ≠ D1, If[D5 ≠ D4, 2, 1], D5 ≠ D4, 1, 0) → D6
  79. Flatten({"", Sequence["\phantom{" + (num1Expanded(n) / 10^(digitMax - n)) + "}", n, 1, digitMax]}) → num1Sub
  80. Sequence(qCoordX + 75 + (52.5 * n), n, 0, 4) → solCoordsX, {125, 177.5, 230, 282.5, 335}
  81. Textfield(input3) → InputBox3
  82. Textfield(input4) → InputBox4
  83. Textfield(input5) → InputBox5
  84. Textfield(inputTop1) → InputTopBox1
  85. Textfield(inputTop2) → InputTopBox2
  86. Textfield(inputTop3) → InputTopBox3
  87. Textfield(inputTop4) → InputTopBox4
  88. Textfield(inputTop5) → InputTopBox5
  89. Flatten({Zip[n ≟ k, n, inputTops, k, Tops], Last[{false, false, false, false, false}, 5 - lenTops]}) → topValidateTop
  90. TableText({num1Tops, num1Cancel, num2Sub, numAnswerList}, "c00_00010", 1, 30) → tableAns
  91. Sequence(If[n ≟ bottomLastIncorrect, true, false], n, 1, 5) → hintColor
  92. PixelsToPoint(Corner[1], Corner[3], Corner[5], (qCoordsX(digitMax), qCoordY + 12)) → Cornernum1
  93. If(showsolution, colorsBottomSol, colorsBottomHint) → colorsBottom
  94. Sequence(If[Defined[topLastIncorrect] ∧ n < topLastIncorrect, true, boolColorTop(n)], n, 1, 5) → boolColorTopHint
  95. Zip(If[n, "#8CBAB4", "#DB8C9A"], n, boolColorTop) → colorsTopSol
  96. Sequence(If[¬(boolTopBox(n)), If[n > topLastIncorrect, "#8CBAB4", "#ffffff"], "#E6B08C"], n, 1, 5) → colorsTopHint
  97. If(showsolution, colorsTopSol, colorsTopHint) → colorsTop
  98. PixelsToPoint(Corner[1], Corner[3], Corner[5], (qCoordsX(maxCancel), qCoordY + 12)) → OnboardingCorner
  99. If(Defined[topLastIncorrect], Flatten[{Sequence["#252525", n, 1, topLastIncorrect - 1], "#C75000", Sequence["#252525", n, 1, lenTops - topLastIncorrect]}], Sequence["#252525", n, 1, lenTops]) → topColors
  100. circlePixels(If[Defined[OnboardingPoints(pulsingIndDisplay)], OnboardingPoints(pulsingIndDisplay), InputPoint], 9 + (9 * pulsing), Corner[1], Corner[3], Corner[5]) → pulsingObject

AI Drawing Prompt Reference

This is an interactive vertical subtraction diagram for practicing multi-digit subtraction with regrouping. The diagram includes two random multi-digit number input boxes, each displaying a number and its expanded form. The vertical subtraction steps are shown in a vertical arrangement from the minuend to the subtrahend, with regrouping operations marked. It also includes a hint area that appears when input is incorrect, and a result display area. The construction order is: first generate two random multi-digit numbers, then display their expanded forms, then draw the vertical subtraction steps, and finally add the hint and result areas.
The prompt above was compiled from the original drawing commands and is for reference only.