Filling Gumball Machines

Filling Gumball Machines
Loading the math board and drawing, please wait…
2021-08-19 11:14
This example demonstrates how to distribute a certain number of gumballs among multiple machines. The core mathematical concepts involved are division and distribution problems. Key construction points: Utilizes GeoGebra commands such as Join, Mod, Sequence, and objects like Point, Segment, SliderAnzahlAutomaten. Suitable for elementary school students in grades 5-6 to understand and practice division concepts.

GeoGebra Commands & Parameters

  1. Join({{140}, Sequence[Random[10, 170], i, 1, 100]}) → randNosb
  2. Mod(a, b) → Rest
  3. Sequence(B + (i * (dx, 0)), i, mindestAnzahlAutomaten, 9) → l1
  4. Point(l1) → SliderAnzahlAutomaten
  5. IndexOf(SliderAnzahlAutomaten, l1) → AnzahlAutomatenSuS
  6. If(bb ≠ maxBB, C'1, C'2) → C'
  7. Segment(C', ZZ) → zz
  8. If(page ≟ 1, (33.7, 1.91), (33.7, 5.91)) → pointPosKugeln
  9. Transpose({Automat1, Automat2, Automat3, Automat4, Automat5, Automat6, Automat7, Automat8, Automat9}) → TransponierteMatrx
  10. Sequence(TransponierteMatrx(floor(i / b) + 1, Mod[i, b] + 1), i, 0, bb - 1) → Zielfunktion
  11. Sequence(Circle[Zielfunktion(i + 1), radius], i, 0, bb) → Kreise
  12. Reverse(Sequence[(x(pointPosKugeln) + Mod[i, KAnzahl], y(pointPosKugeln) - floor(i / KAnzahl)), i, 0, a - 1]) → RechteListe
  13. Sequence(Circle[Zielfunktion((color * i) + 1), radius], i, 0, bb) → Z1
  14. Sequence(Circle[Zielfunktion((color * i) + 2), radius], i, 0, bb) → Z2
  15. Sequence(Circle[Zielfunktion((color * i) + 3), radius], i, 0, bb) → Z3
  16. Sequence(Circle[Zielfunktion((color * i) + 4), radius], i, 0, bb) → Z4
  17. Sequence(Circle[Zielfunktion((color * i) + 5), radius], i, 0, bb) → Z5
  18. Shuffle({color1, color2, color3, color4, color5}) → Colors, {"#39bcff", "#13961f", "#e02026", "#ffb400", "#ff004d5e"}
  19. Sequence(Circle[RechteListe((color * i) + 4), radius], i, test2, a) → R4
  20. Sequence(Circle[RechteListe((color * i) + 5), radius], i, test1, a) → R5
  21. Sequence(Circle[RechteListe((color * i) + 3), radius], i, test3, a) → R3
  22. Sequence(Circle[RechteListe((color * i) + 2), radius], i, test4, a) → R1
  23. Sequence(Circle[RechteListe((color * i) + 1), radius], i, test5, a) → R2
  24. Sequence(Circle[Hilfsfunktion(i), radius], i, 1, bb) → ZielfunktionKreise
  25. OrthogonalLine(A, yAxis) → f
  26. Sequence((x(PicL(i)) + Autbreite, y(PicL(i))), i, 1, 9) → PicR
  27. Sequence(B + (i * (dx, 0)), i, 0, 9) → l3
  28. Point(Circle[B, Max[l3]]) → E
  29. Segment(l3(2), l3(10)) → g
  30. Textfield(input1) → Eingabefeld3
  31. Defined(input1) → fixedSlider
  32. LaTeX(Text5, true, true) → Text1
  33. LaTeX(page, true, true) → Text8
  34. If(page ≟ 1, bb ≟ M) → d
  35. If(page ≟ 1, bb ≟ maxBB, page ≟ 2, showbtnNochmal ∧ c ≟ c, true) → fixed

AI Drawing Prompt Reference

Draw a gumball distribution scene: a row of vending machines at the top, each shown as a circle holding gumballs; a slider sets the number of machines, a random total of gumballs is generated and divided evenly among the machines with any remainder shown separately. Gumballs appear in five repeating colors arranged in a neat grid. An input box on the right lets students enter answers, and a “Try Again” button sits at the bottom. The layout is clear and suited for grades 5‑6 to practice division and distribution.
The prompt above was compiled from the original drawing commands and is for reference only.