Random Circles and Squares in GeoGebra: Relative Frequency to Fractions, Decimal
Loading the math board and drawing, please wait…
In collections
Wiederholung: absolute, relative & prozentuelle Häufigkeit
This GeoGebra example generates and displays randomly placed circles and squares using a controlled layout, then uses the resulting counts to practice calculating relative frequency and expressing it in three formats: fraction, decimal, and percent. Key concepts include relative frequency computation and number representation (fraction/decimal/percentage), together with basic geometric construction and grouping of shapes as datasets. Construction highlights: Shuffle randomizes indices/positions (e.g., randomNosForX/Y) and, with Sequence, Join, and Zip, builds combined object lists; Element selects items from sequences; If and Textfield provide conditional logic and dynamic textual feedback; Polygon constructs the square boundaries; Append/Remove/Length manage lists of objects as the visualization updates; the model organizes geometry through objects such as sizeQ1–sizeQ3, listQuadrateO/G, listKreiseO/G, and layout controls listLayout1–2 (including layout1 and fby). Suitable for grades 5–6 and for probability & statistics lessons that connect counting outcomes with relative frequency representations.
GeoGebra Commands & Parameters
Shuffle(Sequence[Random[6, 10], i, 1, 100]) → randomNosForY, {9, 6, 6, 6, 8, 10, 10, 6, 6, 10, 10, 9, 9, 6, 7, 6, 8, 9, 6, 7, 7, 8, 10, 10, 9, 6, 7, 7, 9, 6, 7, 10, 8, 6, 10, 9, 7, 9, 8, 10, 6, 10, 7, 8, 6, 7, 8, 10, 6, 6, 8, 8, 7, 7, 7, 10, 9, 9, 7, 6, 10, 8, 7, 7, 7, 9, 8, 10, 10, 8, 7, 8, 9, 6, 6, 10, 6, 8, 10, 7, 6, 9, 9, 10, 10, 8, 7, 10, 7, 9, 9, 10, 8, 9, 6, 9, 8, 6, 6, 9}Element(randomNosForY, Mod[questionCount, 100] + 1) → numYZip(Random[1, m - 4], m, randomNosForY) → randomNosForXElement(randomNosForX, Mod[questionCount, 100] + 1) → numXSequence(listPos(m), m, 1, numX) → listPosXZip(Random[1, m - n - 2], m, randomNosForY, n, randomNosForX) → randomNosForY1Element(randomNosForY1, Mod[questionCount, 100] + 1) → numY1Sequence(listPos(m), m, numX + 1, numX + numY1) → listPosY1Zip(Random[1, m - n - j - 1], m, randomNosForY, n, randomNosForX, j, randomNosForY1) → randomNosForY2Element(randomNosForY2, Mod[questionCount, 100] + 1) → numY2Sequence(listPos(m), m, numX + numY1 + 1, numX + numY1 + numY2) → listPosY2Zip(m - n - j - k, m, randomNosForY, n, randomNosForX, j, randomNosForY1, k, randomNosForY2) → randomNosForY3Element(randomNosForY3, Mod[questionCount, 100] + 1) → numY3Sequence(listPos(m), m, numY - numY3 + 1, numY) → listPosY3Join(Sequence[Shuffle[{1, 2, 3, 4}], i, 1, 15]) → listLayout1Zip(Translate[Dilate[Polygon[(-1, 1), (1, 1), (1, -1), (-1, -1)], RandomElement[{sizeQ1, sizeQ2, sizeQ3}]], P], P, If[layout1 ≟ 1, listPosY3, If[layout1 ≟ 2, listPosY2, If[layout1 ≟ 3, listPosY1, listPosX]]]) → listQuadrateOZip(Translate[Dilate[Polygon[(-1, 1), (1, 1), (1, -1), (-1, -1)], RandomElement[{sizeQ1, sizeQ2, sizeQ3}]], P], P, If[layout1 ≟ 1, listPosY2, If[layout1 ≟ 2, listPosY3, If[layout1 ≟ 3, listPosX, listPosY1]]]) → listQuadrateGZip(Circle[P, RandomElement[{sizeK1, sizeK2, sizeK3}]], P, If[layout1 ≟ 1, listPosY1, If[layout1 ≟ 2, listPosX, If[layout1 ≟ 3, listPosY3, listPosY2]]]) → listKreiseOZip(Circle[P, RandomElement[{sizeK1, sizeK2, sizeK3}]], P, If[layout1 ≟ 1, listPosX, If[layout1 ≟ 2, listPosY1, If[layout1 ≟ 3, listPosY2, listPosY3]]]) → listKreiseGZip(RandomElement[If[m ≟ 1, {1, 3, 5}, If[m ≟ 2, {1, 3, 4}, If[m ≟ 3, {2, 3, 5}, {2, 3, 4}]]]], m, listLayout1) → listLayout2Length(Join[{listKreiseG, listKreiseO, listQuadrateG, listQuadrateO}]) → z3If(layout1 ∈ {2, 4}, numY3 + numY1, If[layout1 ∈ {1, 3}, numY2 + numX]) → z5If(layout1 ∈ {1, 3}, numY3 + numY1, If[layout1 ∈ {2, 4}, numY2 + numX]) → z4If(layout1 ∈ {3, 4}, numX + numY1, If[layout1 ∈ {1, 2}, numY2 + numY3]) → z2If(layout1 ∈ {1, 2}, numX + numY1, If[layout1 ∈ {3, 4}, numY2 + numY3]) → z1Shuffle(Sequence[listPos(m), m, 1, numY]) → listPosY, {(1.932973916771916, 3.3793097467138247), (4.728560732469609, 7.471969859872191), (4.2535141187345085, 3.0870935731333464), (4.6316762257210025, 5.235741908283913), (6.505297573972283, 3.3449313733514154), (6.952216427683594, 8.261038764175922), (2.5861630106576814, 5.579525641908005), (7.038162361089617, 5.734228322038846), (0.9360010892620616, 7.17812000326004)}Textfield(input1) → InputBox1Textfield(input2) → InputBox2Polygon(PtopLeftCornerFeedback, PtopRightCornerFeedback, PbottomRightCornerFeedback, PbottomLeftCornerFeedback) → rectangleCorrect, rectangleCorrectS3, rectangleCorrectS4, rectangleCorrectS2, rectangleCorrectS1Append(true, Sequence[If[randomNosForX(i) ≟ randomNosForX(i - 1), false, true], i, 2, 100]) → stayXAppend(true, Sequence[If[randomNosForY(i) ≟ randomNosForY(i - 1), false, true], i, 2, 100]) → stayYRemove(Sequence[If[stayX(i), randomNosForX(i), 0], i, 1, 100], Sequence[0, i, 1, 100]) → randomNosForXwithoutRepeatRemove(Sequence[If[stayY(i), randomNosForY(i), 0], i, 1, 100], Sequence[0, i, 1, 100]) → randomNosForYwithoutRepeatElement(randomNosForXwithoutRepeat, Mod[questionCount, Length[randomNosForXwithoutRepeat]] + 1) → numXwithoutRepeatElement(randomNosForYwithoutRepeat, Mod[questionCount, Length[randomNosForYwithoutRepeat]] + 1) → numYwithoutRepeatDefined((input1 * input2)) → fixed
AI Drawing Prompt Reference
Draw several circles and squares randomly scattered on the canvas, divided into four distinct groups with different quantities of each shape; circles come in three different sizes, and squares also come in three different sizes; each group is visually distinguished by color or marker to form separate regions; leave blank space at the bottom or side of the canvas for answer input boxes and result feedback areas; the overall layout should make the four groups clearly distinguishable to facilitate counting the number of circles and squares in each group.
The prompt above was compiled from the original drawing commands and is for reference only.