What matches what? – Common Multiples Matching Game

What matches what? – Common Multiples Matching Game
Loading the math board and drawing, please wait…
2023-01-26 10:34
This GeoGebra example is an interactive matching game designed to help students understand common multiples and the least common multiple (LCM) through visual geometric representations and numerical matching. The core math concepts covered include multiples, common multiples, and the least common multiple of natural numbers. In terms of construction, the applet uses a combination of powerful GeoGebra commands: `Polygon` is used to draw visual blocks representing numbers, while commands like `Sequence`, `Shuffle`, `Append`, and `Remove` dynamically generate and randomize the matching options on the screen. Logic commands such as `If`, `Max`, `CountIf`, and `PointIn` are employed to track user clicks and verify matches. This material is tailored for students in grades 5–6, serving as an excellent interactive classroom exercise to build strong number sense and mathematical reasoning skills.

GeoGebra Commands & Parameters

  1. Polygon(allowedRect4, allowedRect3, allowedRect2, allowedRect1) → allowedRect, a_1, b, c, d
  2. Max(widthsOptionsR) → widthR
  3. Max(heightsOptionsR) → heightR
  4. Max(heightR, Max[heightsOptionsL]) → heightL
  5. Max(widthsOptionsL) → widthL
  6. If(isShuffleOptionsLechts, Shuffle[1…numOptionsR], 1…numOptionsR) → indizesOptionsRechts
  7. If(isShuffleOptionsLinks, Shuffle[1…numOptionsL], 1…numOptionsL) → indizesOptionsLinks
  8. Textfield(input1) → InputBox1
  9. Textfield(input2) → InputBox2
  10. Polygon(PtopLeftCornerFeedback, PtopRightCornerFeedback, PbottomRightCornerFeedback, PbottomLeftCornerFeedback) → rectangleCorrect, rectangleCorrectS3, rectangleCorrectS4, rectangleCorrectS2, rectangleCorrectS1
  11. Shuffle(Sequence[Random[0, 10], i, 1, 100]) → randomNosForX, {10, 5, 9, 4, 8, 1, 5, 2, 2, 6, 3, 7, 7, 1, 7, 4, 0, 8, 0, 1, 0, 8, 6, 0, 7, 3, 4, 10, 4, 8, 5, 9, 3, 5, 3, 7, 8, 0, 5, 6, 6, 4, 9, 10, 9, 8, 2, 6, 6, 1, 9, 6, 2, 4, 8, 2, 1, 9, 3, 10, 10, 10, 9, 4, 5, 6, 0, 7, 1, 4, 0, 4, 10, 2, 3, 4, 3, 0, 2, 9, 9, 5, 2, 4, 7, 4, 7, 6, 2, 5, 8, 0, 8, 9, 0, 3, 2, 6, 7, 9}
  12. Element(randomNosForX, Mod[questionCount, 100] + 1) → numX
  13. Shuffle(Sequence[Random[0, 10], i, 1, 100]) → randomNosForY, {4, 5, 2, 9, 0, 10, 1, 1, 1, 3, 3, 1, 2, 0, 3, 10, 5, 2, 4, 10, 5, 1, 0, 8, 1, 10, 10, 4, 9, 1, 2, 2, 9, 7, 4, 4, 2, 2, 7, 4, 9, 2, 8, 5, 2, 10, 10, 6, 5, 3, 6, 5, 3, 0, 9, 6, 3, 1, 9, 8, 10, 6, 9, 9, 7, 3, 8, 8, 8, 0, 8, 9, 4, 3, 1, 4, 3, 8, 8, 2, 10, 5, 10, 1, 0, 10, 9, 5, 0, 1, 2, 9, 5, 9, 6, 2, 7, 6, 8, 1}
  14. Element(randomNosForY, Mod[questionCount, 100] + 1) → numY
  15. Append(true, Sequence[If[randomNosForX(i) ≟ randomNosForX(i - 1), false, true], i, 2, 100]) → stayX
  16. Append(true, Sequence[If[randomNosForY(i) ≟ randomNosForY(i - 1), false, true], i, 2, 100]) → stayY
  17. Remove(Sequence[If[stayX(i), randomNosForX(i), 0], i, 1, 100], Sequence[0, i, 1, 100]) → randomNosForXwithoutRepeat
  18. Remove(Sequence[If[stayY(i), randomNosForY(i), 0], i, 1, 100], Sequence[0, i, 1, 100]) → randomNosForYwithoutRepeat
  19. Element(randomNosForXwithoutRepeat, Mod[questionCount, Length[randomNosForXwithoutRepeat]] + 1) → numXwithoutRepeat
  20. Element(randomNosForYwithoutRepeat, Mod[questionCount, Length[randomNosForYwithoutRepeat]] + 1) → numYwithoutRepeat
  21. Sequence(1) → positionsOptionsRechts
  22. Sequence(Element[optionsRAll, indizesOptionsRechts(i)], i, 1, numOptionsR) → optionsRActual
  23. Length(optionsRActual) → a
  24. Sequence(Element[optionsLAll, indizesOptionsLinks(i)], i, 1, numOptionsL) → optionsLActual
  25. Sequence(allOptionsL(indizesOptionsLinks(i)), i, 1, numOptionsL) → optionsL
  26. Sequence(allOptionsR(indizesOptionsLinks(i)), i, 1, numOptionsL) → optionsR
  27. Polygon((-10, -2), (10, -2), (10, 10), (-10, 10)) → q1, q_1, r_1, s_1, t_1
  28. Text(optionsLActual(1), CenterOptionL1, true, true, 0, 0) → opL1
  29. Text(optionsLActual(2), CenterOptionL2, true, true, 0, 0) → opL2
  30. Text(optionsLActual(3), CenterOptionL3, true, true, 0, 0) → opL3
  31. Text(optionsLActual(4), CenterOptionL4, true, true, 0, 0) → opL4
  32. Text(optionsLActual(5), CenterOptionL5, true, true, 0, 0) → opL5
  33. PointIn(allowedRect) → CenterOptionR1
  34. Text(optionsRActual(1), CenterOptionR1, true, true, 0, 0) → opR1
  35. Polygon(CenterOptionR1, CenterOptionR1 - (widthR / 2, heightR / 2), CenterOptionR1 + (widthR / 2, ((-heightR)) / 2), CenterOptionR1 + (widthR / 2, heightR / 2), CenterOptionR1 - (widthR / 2, ((-heightR)) / 2), CenterOptionR1 - (widthR / 2, heightR / 2)) → rectRMove1, centeroptionr1, f, g, h, i, j
  36. PointIn(allowedRect) → CenterOptionR2
  37. Text(optionsRActual(2), CenterOptionR2, true, true, 0, 0) → opR2
  38. Polygon(CenterOptionR2, CenterOptionR2 - (widthR / 2, heightR / 2), CenterOptionR2 + (widthR / 2, ((-heightR)) / 2), CenterOptionR2 + (widthR / 2, heightR / 2), CenterOptionR2 - (widthR / 2, ((-heightR)) / 2), CenterOptionR2 - (widthR / 2, heightR / 2)) → rectRMove2, centeroptionr2, k, l, m, n, p
  39. PointIn(allowedRect) → CenterOptionR3
  40. Text(optionsRActual(3), CenterOptionR3, true, true, 0, 0) → opR3
  41. Polygon(CenterOptionR3, CenterOptionR3 - (widthR / 2, heightR / 2), CenterOptionR3 + (widthR / 2, ((-heightR)) / 2), CenterOptionR3 + (widthR / 2, heightR / 2), CenterOptionR3 - (widthR / 2, ((-heightR)) / 2), CenterOptionR3 - (widthR / 2, heightR / 2)) → rectRMove3, centeroptionr3, q, r, s, t, e
  42. PointIn(allowedRect) → CenterOptionR4
  43. Text(optionsRActual(4), CenterOptionR4, true, true, 0, 0) → opR4
  44. Polygon(CenterOptionR4, CenterOptionR4 - (widthR / 2, heightR / 2), CenterOptionR4 + (widthR / 2, ((-heightR)) / 2), CenterOptionR4 + (widthR / 2, heightR / 2), CenterOptionR4 - (widthR / 2, ((-heightR)) / 2), CenterOptionR4 - (widthR / 2, heightR / 2)) → rectRMove4, centeroptionr4, f_1, g_1, h_1, i_1, j_1
  45. PointIn(allowedRect) → CenterOptionR5
  46. Text(optionsRActual(5), CenterOptionR5, true, true, 0, 0) → opR5
  47. Polygon(CenterOptionR5, CenterOptionR5 - (widthR / 2, heightR / 2), CenterOptionR5 + (widthR / 2, ((-heightR)) / 2), CenterOptionR5 + (widthR / 2, heightR / 2), CenterOptionR5 - (widthR / 2, ((-heightR)) / 2), CenterOptionR5 - (widthR / 2, heightR / 2)) → rectRMove5, centeroptionr5, k_1, l_1, m_1, n_1, p_1
  48. If(CountIf[P ∈ answerRectLarger1(1), P, verticesR1] ≟ 4, 1, -1, CountIf[P ∈ answerRectLarger2(1), P, verticesR1] ≟ 4, 2, CountIf[P ∈ answerRectLarger3(1), P, verticesR1] ≟ 4, 3, CountIf[P ∈ answerRectLarger4(1), P, verticesR1] ≟ 4, 4, CountIf[P ∈ answerRectLarger5(1), P, verticesR1] ≟ 4, 5) → indexAnswerR1
  49. If(CountIf[P ∈ answerRectLarger1(1), P, verticesR2] ≟ 4, 1, -1, CountIf[P ∈ answerRectLarger2(1), P, verticesR2] ≟ 4, 2, CountIf[P ∈ answerRectLarger3(1), P, verticesR2] ≟ 4, 3, CountIf[P ∈ answerRectLarger4(1), P, verticesR2] ≟ 4, 4, CountIf[P ∈ answerRectLarger5(1), P, verticesR2] ≟ 4, 5) → indexAnswerR2
  50. If(CountIf[P ∈ answerRectLarger1(1), P, verticesR3] ≟ 4, 1, -1, CountIf[P ∈ answerRectLarger2(1), P, verticesR3] ≟ 4, 2, CountIf[P ∈ answerRectLarger3(1), P, verticesR3] ≟ 4, 3, CountIf[P ∈ answerRectLarger4(1), P, verticesR3] ≟ 4, 4, CountIf[P ∈ answerRectLarger5(1), P, verticesR3] ≟ 4, 5) → indexAnswerR3
  51. If(CountIf[P ∈ answerRectLarger1(1), P, verticesR4] ≟ 4, 1, -1, CountIf[P ∈ answerRectLarger2(1), P, verticesR4] ≟ 4, 2, CountIf[P ∈ answerRectLarger3(1), P, verticesR4] ≟ 4, 3, CountIf[P ∈ answerRectLarger4(1), P, verticesR4] ≟ 4, 4, CountIf[P ∈ answerRectLarger5(1), P, verticesR4] ≟ 4, 5) → indexAnswerR4
  52. If(CountIf[P ∈ answerRectLarger1(1), P, verticesR5] ≟ 4, 1, -1, CountIf[P ∈ answerRectLarger2(1), P, verticesR5] ≟ 4, 2, CountIf[P ∈ answerRectLarger3(1), P, verticesR5] ≟ 4, 3, CountIf[P ∈ answerRectLarger4(1), P, verticesR5] ≟ 4, 4, CountIf[P ∈ answerRectLarger5(1), P, verticesR5] ≟ 4, 5) → indexAnswerR5
  53. CountIf(ind ≠ -1, ind, indizesAnswerR) → numAnswersDraggedToLeft
  54. If(correct, "\vphantom{✘}✓ Richtig", If[correctpartially, "\vphantom{✓}✘ Teilweise richtig", "\vphantom{✓}✘ Falsch"]) → correctTextTemp
  55. Text((("\Large\textsf{" * correctTextTemp) * "}"), PStartCorrectText, true, true, 1, 0) → correctText

AI Drawing Prompt Reference

Create an interactive matching game for common multiples: a left column with five fixed number cards, a right column with five draggable rectangular cards placed randomly inside a defined rectangular area, each card showing its number; a feedback rectangle below to indicate correct matches, and two input boxes for user answers. Cards size themselves to fit the text, right‑side cards start at random non‑overlapping positions, and the overall layout is clean and suitable for grades 5‑6.
The prompt above was compiled from the original drawing commands and is for reference only.