Prime and Composite Numbers by Guillermo Bautista
Loading the math board and drawing, please wait…
This example demonstrates the concepts of prime and composite numbers. Using a random number generator and a prime number function, users can generate a series of numbers and distinguish which are prime and which are composite. The construction uses commands such as RandomElement, Polygon, IsPrime, IsInRegion, Sequence, and Sum, making it suitable for upper elementary or middle school students to learn about prime and composite numbers.
GeoGebra Commands & Parameters
RandomElement({4, 6, 8, 9, 10, 12, 14, 15, 16, 18, 20, 21, 22, 24, 25}) → c1, 8RandomElement({26, 27, 28, 30, 32, 33, 34, 35, 36, 38, 39, 40, 42, 44, 45}) → c2, 38RandomElement({46, 48, 49, 50, 51, 52, 54, 55, 56, 57, 58, 60, 62, 63, 64}) → c3, 64RandomElement({65, 66, 68, 69, 70, 72, 74, 75, 76, 77, 78, 80, 81, 82, 84}) → c4, 78RandomElement({85, 86, 87, 88, 90, 91, 92, 93, 94, 95, 96, 98, 99, 100}) → c5, 99RandomElement({2, 3, 5, 7, 11}) → p1, 11RandomElement({13, 17, 19, 23, 29}) → p2, 23RandomElement({31, 37, 41, 43, 47}) → p3, 41RandomElement({53, 59, 61, 67, 71}) → p4, 53RandomElement({73, 79, 83, 89, 97}) → p5, 73RandomElement({c1, p1}) → a1, 11RandomElement({c2, p2}) → a2, 23RandomElement({c3, p3}) → a3, 64RandomElement({c4, p4}) → a4, 53RandomElement({c5, p5}) → a5, 73Polygon(A, B, C, D) → q1, a, b, c, dPolygon(E, F, G, H) → q2, e, f, g, hIsPrime(a1) → isa1primeIsInRegion(A_1, q1) → isa1inbox1IsInRegion(A_1, q2) → isa1inbox2IsInRegion(A_2, q1) → isa2inbox1IsInRegion(A_3, q1) → isa3inbox1IsInRegion(A_4, q1) → isa4inbox1IsInRegion(A_5, q1) → isa5inbox1IsInRegion(A_2, q2) → isa2inbox2IsInRegion(A_3, q2) → isa3inbox2IsInRegion(A_4, q2) → isa4inbox2IsInRegion(A_5, q2) → isa5inbox2IsPrime(a2) → isa2primeIsPrime(a3) → isa3primeIsPrime(a4) → isa4primeIsPrime(a5) → isa5primeSequence(If[Element[anskey, i], 1, 0], i, 1, 5) → score, {0, 0, 0, 0, 0}Sum(score) → totalscore
AI Drawing Prompt Reference
Randomly generate five even and one odd number, mix and pair them randomly, represent each pair with a polygon, classify based on whether the numbers are prime and whether they are inside the polygons, and finally count the number of prime numbers.
The prompt above was compiled from the original drawing commands and is for reference only.