Grandes

Pequeñas

Blancas

Negras

Total

Total

:

..

:

peques

blancas

negras

:

:

Cambia

pequeñas: 4
ale = Random(1, 8)
blancas: 6
paso = 10 (slider from 0 to 10, step 1)
blancasygrandes: 3
grandes: 5
total: grandes + pequeñas
negras: total - blancas
negrasygrandes: grandes - blancasygrandes
negrasypequeñas: negras - negrasygrandes
blancasypequeñas: blancas - blancasygrandes
D2 = If(paso > 0, "" + grandes, "")
D3 = If(paso > 1, "" + pequeñas, "")
CasillaDeEntrada1 = Textfield(grandes)
CasillaDeEntrada2 = Textfield(A2)
CasillaDeEntrada3 = Textfield(pequeñas)
CasillaDeEntrada4 = Textfield(A3)
D4 = If(paso > 2, "" + total, "")
C2 = If(paso > 6, "" + negrasygrandes, "")
B2 = If(paso > 5, "" + blancasygrandes, "")
C3 = If(paso > 8, "" + negrasypequeñas, "")
B3 = If(paso > 6, "" + blancasypequeñas, "")
C4 = If(paso > 4, "" + negras, "")
B4 = If(paso > 3, "" + blancas, "")
texto1 = TableText({{A1, B1, C1, D1}, {A2, B2, C2, D2}, {A3, B3, C3, D3}, {A4, B4, C4, D4}}, "c|_")
CasillaDeEntrada5 = Textfield(B1)
CasillaDeEntrada6 = Textfield(C1)
CasillaDeEntrada7 = Textfield(blancas)
texto2: ": " + negras + ""
texto3: "" + B1 + " de entre las " + A2 + ""
CasillaDeEntrada8 = Textfield(blancasygrandes)
borrra = First(TextToUnicode[C1], 2)
A6 = Random(1, 4)
B6 = If(Mod[A6, 2] > 0, B1, C1)
C6 = If(A6 < 3, A2, A3)
D6 = Element({B2, C2, B3, C3}, A6)
texto5: "P \; (" + (LaTeX[UnicodeToText[First[TextToUnicode[B6], 2]]]) + "∩" + (LaTeX[UnicodeToText[First[TextToUnicode[C6], 2]]]) + ")=\frac{" + (LaTeX[D6]) + "}{" + (LaTeX[total]) + "}"
A8 = Random(1, 8)
B8 = If(A8 < 3, B1, If[A8 < 5, C1, If[A8 < 7, A2, A3]])
C8 = If(A8 ≟ 1 ∨ A8 ≟ 3, A2, If[A8 < 5, A3, If[A8 ≟ 5 ∨ A8 ≟ 7, B1, C1]])
B9 = Element({B2, B3, C2, C3, B2, C2, B3, C3}, A8)
C9 = Element({D2, D3, D2, D3, B4, C4, B4, C4}, A8)
texto4: "P \; (" + (LaTeX[UnicodeToText[First[TextToUnicode[B8], 2]]]) + "|" + (LaTeX[UnicodeToText[First[TextToUnicode[C8], 2]]]) + ")=\frac{" + (LaTeX[B9]) + "}{" + (LaTeX[C9]) + "}  "