Prime Number Checker

Prime Number Checker
Loading the math board and drawing, please wait…
2022-03-09 17:12
In collections Primzahlen
This example demonstrates how to check if input numbers are prime. Core math concepts include the definition and determination of prime numbers. GeoGebra commands and objects used: Textfield, Polygon, Shuffle, Element, Append, Remove, DivisorsList, Factors, CountIf. Suitable for 5th-6th grade students to learn and practice prime number concepts.

GeoGebra Commands & Parameters

  1. Textfield(aInput) → InputBox1
  2. Textfield(bInput) → InputBox2
  3. Polygon(PtopLeftCornerFeedback, PtopRightCornerFeedback, PbottomRightCornerFeedback, PbottomLeftCornerFeedback) → rectangleCorrect, ptopleftcornerfeedback, ptoprightcornerfeedback, pbottomrightcornerfeedback, pbottomleftcornerfeedback
  4. Shuffle(Sequence[Random[0, 10], i, 1, 100]) → randomNosForX, {6, 2, 1, 1, 3, 2, 5, 5, 1, 3, 1, 6, 4, 0, 0, 3, 3, 5, 3, 3, 10, 10, 3, 7, 3, 10, 5, 8, 3, 6, 6, 8, 0, 8, 4, 4, 6, 9, 2, 4, 2, 8, 8, 9, 7, 0, 1, 10, 2, 1, 9, 1, 5, 1, 2, 4, 8, 10, 9, 6, 3, 10, 0, 9, 5, 5, 4, 0, 4, 5, 1, 7, 2, 1, 6, 3, 0, 0, 6, 1, 10, 5, 5, 3, 10, 1, 8, 0, 2, 10, 8, 0, 5, 6, 10, 6, 4, 10, 9, 9}
  5. Element(randomNosForX, Mod[questionCount, 100] + 1) → numX
  6. Shuffle(Sequence[Random[0, 10], i, 1, 100]) → randomNosForY, {7, 5, 2, 3, 8, 3, 0, 3, 6, 9, 2, 5, 0, 4, 4, 8, 7, 2, 9, 1, 5, 1, 6, 7, 10, 9, 2, 6, 1, 2, 10, 0, 2, 7, 3, 4, 2, 3, 3, 3, 6, 4, 9, 10, 10, 2, 8, 3, 3, 5, 2, 4, 2, 2, 10, 2, 3, 1, 1, 1, 0, 7, 5, 0, 7, 9, 4, 1, 5, 5, 3, 8, 2, 2, 4, 6, 2, 3, 6, 2, 0, 4, 6, 4, 0, 3, 4, 9, 9, 2, 0, 8, 7, 0, 7, 8, 3, 1, 2, 3}
  7. Element(randomNosForY, Mod[questionCount, 100] + 1) → numY
  8. Append(true, Sequence[If[randomNosForX(i) ≟ randomNosForX(i - 1), false, true], i, 2, 100]) → stayX
  9. Append(true, Sequence[If[randomNosForY(i) ≟ randomNosForY(i - 1), false, true], i, 2, 100]) → stayY
  10. Remove(Sequence[If[stayX(i), randomNosForX(i), 0], i, 1, 100], Sequence[0, i, 1, 100]) → randomNosForXwithoutRepeat
  11. Remove(Sequence[If[stayY(i), randomNosForY(i), 0], i, 1, 100], Sequence[0, i, 1, 100]) → randomNosForYwithoutRepeat
  12. Element(randomNosForXwithoutRepeat, Mod[questionCount, Length[randomNosForXwithoutRepeat]] + 1) → numXwithoutRepeat
  13. Element(randomNosForYwithoutRepeat, Mod[questionCount, Length[randomNosForYwithoutRepeat]] + 1) → numYwithoutRepeat
  14. Polygon(O, P, R, Q) → v1, o, p, r, q
  15. DivisorsList(AA) → Teilermenge
  16. Factors(AA) →
  17. CountIf(x > 0, Teilermenge) → countingElements

AI Drawing Prompt Reference

This is an interactive graphic interface for checking if a number is prime. The interface includes two input boxes for entering numbers to check. A rectangle in the center displays feedback information. Below are two random number lists for generating test numbers. There is also a sequence that marks whether numbers repeat and removes duplicates, resulting in a list of unique numbers. The interface also contains a polygon to display the factors of a number, along with a list of factors and a count display. The construction order is: first create the input boxes and rectangle, then generate the random number lists, next use the sequence to remove duplicates, then build the polygon and calculate factors and count, and finally combine all elements to display them.
The prompt above was compiled from the original drawing commands and is for reference only.