素数检查器

素数检查器
几何画板及绘图内容加载中,请稍等……
2022-03-09 17:12
所属专题 Primzahlen
①本范例演示如何检查输入的数字是否为素数;②涉及的核心数学概念为素数的定义与判定;③作图要点:使用了Textfield, Polygon, Shuffle, Element, Append, Remove, DivisorsList, Factors, CountIf等GeoGebra命令与对象;④适合小学5-6年级学生,用于学习和实践素数概念。

GeoGebra 命令及参数

  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 绘图提示语参考

这是一个用于检查数字是否为质数的交互式图形界面。界面包含两个输入框,用户可输入待检查的数字。界面中央有一个矩形,用于显示反馈信息。下方有两个随机数字列表,用于生成测试数字。还有一个判断序列,用于标记数字是否重复,并去除重复数字,得到不重复的列表。界面还包含一个多边形,用于展示数字的因数,以及因数列表和计数显示。构造顺序为:先创建输入框和矩形,然后生成随机数字列表,接着通过判断序列去除重复数字,再构建多边形并计算因数和计数,最后将所有元素组合显示在界面中。
以上提示语为根据原始绘图命令整理而来,仅供参考。