Prime and Composite Numbers by Guillermo Bautista

Prime and Composite Numbers by Guillermo Bautista
Loading the math board and drawing, please wait…
2022-04-18 18:28
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

  1. RandomElement({4, 6, 8, 9, 10, 12, 14, 15, 16, 18, 20, 21, 22, 24, 25}) → c1, 8
  2. RandomElement({26, 27, 28, 30, 32, 33, 34, 35, 36, 38, 39, 40, 42, 44, 45}) → c2, 38
  3. RandomElement({46, 48, 49, 50, 51, 52, 54, 55, 56, 57, 58, 60, 62, 63, 64}) → c3, 64
  4. RandomElement({65, 66, 68, 69, 70, 72, 74, 75, 76, 77, 78, 80, 81, 82, 84}) → c4, 78
  5. RandomElement({85, 86, 87, 88, 90, 91, 92, 93, 94, 95, 96, 98, 99, 100}) → c5, 99
  6. RandomElement({2, 3, 5, 7, 11}) → p1, 11
  7. RandomElement({13, 17, 19, 23, 29}) → p2, 23
  8. RandomElement({31, 37, 41, 43, 47}) → p3, 41
  9. RandomElement({53, 59, 61, 67, 71}) → p4, 53
  10. RandomElement({73, 79, 83, 89, 97}) → p5, 73
  11. RandomElement({c1, p1}) → a1, 11
  12. RandomElement({c2, p2}) → a2, 23
  13. RandomElement({c3, p3}) → a3, 64
  14. RandomElement({c4, p4}) → a4, 53
  15. RandomElement({c5, p5}) → a5, 73
  16. Polygon(A, B, C, D) → q1, a, b, c, d
  17. Polygon(E, F, G, H) → q2, e, f, g, h
  18. IsPrime(a1) → isa1prime
  19. IsInRegion(A_1, q1) → isa1inbox1
  20. IsInRegion(A_1, q2) → isa1inbox2
  21. IsInRegion(A_2, q1) → isa2inbox1
  22. IsInRegion(A_3, q1) → isa3inbox1
  23. IsInRegion(A_4, q1) → isa4inbox1
  24. IsInRegion(A_5, q1) → isa5inbox1
  25. IsInRegion(A_2, q2) → isa2inbox2
  26. IsInRegion(A_3, q2) → isa3inbox2
  27. IsInRegion(A_4, q2) → isa4inbox2
  28. IsInRegion(A_5, q2) → isa5inbox2
  29. IsPrime(a2) → isa2prime
  30. IsPrime(a3) → isa3prime
  31. IsPrime(a4) → isa4prime
  32. IsPrime(a5) → isa5prime
  33. Sequence(If[Element[anskey, i], 1, 0], i, 1, 5) → score, {0, 0, 0, 0, 0}
  34. 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.