Fraction of Chocolate Bars

Fraction of Chocolate Bars
Loading the math board and drawing, please wait…
2013-04-17 17:18
This example demonstrates how to represent the shaded part of chocolate bars using fractions. The core mathematical concept involved is fractions. Using GeoGebra commands such as Random, If, Point, Segment, Vector, and Polygon, dynamic geometric figures can be constructed. Suitable for high-grade elementary or junior high school students to learn about fractions and their applications.

GeoGebra Commands & Parameters

  1. Random(2, 10) → Den
  2. Random(1, Den - 1) → Num
  3. If(Scale * 2 < Tot, Scale * 2, 0) → b
  4. If(Scale * 3 < Tot, Scale * 3, 0) → c
  5. If(Scale * 4 < Tot, Scale * 4, 0) → d
  6. If(Scale * 5 < Tot, Scale * 5, 0) → e
  7. If(Scale * 6 < Tot, Scale * 6, 0) → f
  8. If(Scale * 7 < Tot, Scale * 7, 0) → g
  9. If(Scale * 8 < Tot, Scale * 8, 0) → h
  10. If(Scale * 9 < Tot, Scale * 9, 0) → i
  11. If(Scale * 10 < Tot, Scale * 10, 0) → j
  12. Point(xAxis) → A
  13. Segment(A, B) → k
  14. Segment(C, D) → l
  15. Segment(E, F) → m
  16. Segment(G, H) → n
  17. Segment(I, J) → p
  18. Segment(K, L) → q
  19. Segment(M, N) → r
  20. Segment(O, P) → s
  21. Segment(Q, R) → t
  22. Segment(S, T) → a_1
  23. Segment(U, V) → b_1
  24. Segment(A, Point[Circle[A, Tot]]) → d_1
  25. Point(d_1) → Z
  26. Segment(B, W) → c_1
  27. Segment(W, A_1) → e_1
  28. Vector(B_1, C_1) → u
  29. Vector(D_1, E_1) → v
  30. Polygon(F_1, G_1, H_1, I_1) → poly1, f_1, g_1, h_1, i_1
  31. Vector(J_1, K_1) → w
  32. Vector(L_1, M_1) → z
  33. Textfield(sans) → inputBox1
  34. If(Ans ≟ sans, 1, 0) → check
  35. If(time < 181, 1, 0) → show1

AI Drawing Prompt Reference

Draw a rectangular chocolate bar and randomly divide it into 2 to 10 pieces. Use a slider to select the number of pieces covered and dynamically show the fraction of the covered part.
The prompt above was compiled from the original drawing commands and is for reference only.