\text{XXXXXXXXX}

$\text{Selecciona un tema:}$

$\textsf{REINICIAR}$

\text{questiontext}

\text{bottomtext.}

$\text{ANIMATE}$

Restart

$\text{BÉISBOL}$

$\text{GOLF\vphantom{Í}}$

$\text{RUGBY\vphantom{Í}}$

$\text{FÚTBOL}$

$\text{TENIS\vphantom{Í}}$

\text{Cliquea los botones para crear una tabla y observa los mismos datos en un diagrama de puntos.}

$\text{BÉISBOL}$

$\text{GOLF\vphantom{Í}}$

$\text{RUGBY\vphantom{Í}}$

$\text{FÚTBOL}$

$\text{TENIS\vphantom{Í}}$

ddMenu: {"$\text{Deportes }$", "$\text{Asignaturas }$", "$\text{Música }$"}
is: SelectedIndex[ddMenu] + 1
itemsMusic: {"\text{POP}", "\text{HIP HOP}", "\text{ROCK}", "\text{SALSA}", "\text{COUNTRY}"}
itemsSports: {"\text{BÉISBOL}", "\text{GOLF}", "\text{RUGBY}", "\text{FÚTBOL}", "\text{TENIS}"}
itemsSubjects: {"\text{FÍSICA}", "\text{INGLÉS}", "\text{CIENCIAS}", "\text{HISTORIA}", "\text{ARTE}"}
itemsEmpty: {"\text{  }", "\text{  }", "\text{  }", "\text{  }", "\text{  }"}
tableItems: {itemsEmpty, itemsSports, itemsSubjects, itemsMusic}
currentItems: tableItems(is)
textCurrentItem1: "" + (LaTeX[currentItems(1)]) + ""
countQuestion = 1
allSports: {"$\text{BÉISBOL}$", "$\text{GOLF\vphantom{Í}}$", "$\text{RUGBY\vphantom{Í}}$", "$\text{FÚTBOL}$", "$\text{TENIS\vphantom{Í}}$"}
allSubjects: {"$\text{FÍSICA}$", "$\text{INGLÉS}$", "$\text{CIENCIAS\vphantom{Í}}$", "$\text{HISTORIA\vphantom{Í}}$", "$\text{ARTE\vphantom{Í}}$"}
allMusic: {"$\text{POP\vphantom{Í}}$", "$\text{HIP HOP\vphantom{Í}}$", "$\text{ROCK\vphantom{Í}}$", "$\text{SALSA\vphantom{Í}}$", "$\text{COUNTRY\vphantom{Í}}$"}
opt1 = 0
opt2 = 0
opt3 = 0
opt4 = 0
opt5 = 0
classFreq: {opt1, opt2, opt3, opt4, opt5}
tableHeader: {"\text{Tema}", "\text{Deporte }", "\text{Asignatura }", "\text{Música }"}
classes: {0, 5, 10, 15, 20}
baseSegm = Segment((0, 0), (20, 0))
ticks = Sequence(((5 * t), 0), t, 1, 3)
rawData = Flatten(Zip[Sequence[A, t, 1, B], A, classes, B, classFreq])
dottie = DotPlot(rawData)
allTextsAnchor: {(0, 0), (5, 0), (10, 0), (15, 0), (20, 0)}
allAxesLabels = Element({itemsSports, itemsSubjects, itemsMusic}, is)
allRotLabels = Zip(RotateText[A, 30°], A, allAxesLabels)
axisLabels = Zip(Text[("" * A), B, false, true, 0, 0], A, allRotLabels, B, allTextsAnchor + (-1, -1.7))
isClickedOpt1 = false
isClickedOpt2 = false
isClickedOpt3 = false
isClickedOpt4 = false
isClickedOpt5 = false
diffLen1: Length[textBasketball] - Length[textCurrentItem1]
textCurrentItem2: "" + (LaTeX[currentItems(2)]) + ""
textCurrentItem3: "" + (LaTeX[currentItems(3)]) + ""
textCurrentItem5: "" + (LaTeX[currentItems(5)]) + ""
textCurrentItem4: "" + (LaTeX[currentItems(4)]) + ""
diffLen2: Length[textBasketball] - Length[textCurrentItem2]
diffLen3: Length[textBasketball] - Length[textCurrentItem3]
diffLen4: Length[textBasketball] - Length[textCurrentItem4]
diffLen5: Length[textBasketball] - Length[textCurrentItem5]
front1 = If(2 ≤ diffLen1 ≤ 3, "BL", 4 ≤ diffLen1 ≤ 5, "BLL", 6 ≤ diffLen1 ≤ 7, "BLLA", diffLen1 ≟ 1, "B", "")
front2 = If(2 ≤ diffLen2 ≤ 3, "BL", 4 ≤ diffLen2 ≤ 5, "BLL", 6 ≤ diffLen2 ≤ 7, "BLLA", diffLen2 ≟ 1, "B", "")
front3 = If(2 ≤ diffLen3 ≤ 3, "BL", 4 ≤ diffLen3 ≤ 5, "BLL", 6 ≤ diffLen3 ≤ 7, "BLLA", diffLen1 ≟ 3, "B", "")
front4 = If(2 ≤ diffLen4 ≤ 3, "BL", 4 ≤ diffLen4 ≤ 5, "BLL", 6 ≤ diffLen4 ≤ 7, "BLLA", diffLen4 ≟ 1, "B", "")
front5 = If(2 ≤ diffLen5 ≤ 3, "B", 4 ≤ diffLen5 ≤ 5, "BL", 6 ≤ diffLen5 ≤ 7, "BLL", diffLen1 ≟ 5, "B", "")
back1 = If(diffLen1 ≟ 1, "B", diffLen1 ≟ 2, "BL", 3 ≤ diffLen1 ≤ 4, "BLL", 5 ≤ diffLen1 ≤ 6, "BLLA", diffLen1 ≟ 7, "BLLAK", diffLen1 ≟ 0, "", "BASKETBALL")
back2 = If(diffLen2 ≟ 1, "B", diffLen2 ≟ 2, "BL", 3 ≤ diffLen2 ≤ 4, "BLL", 5 ≤ diffLen2 ≤ 6, "BLLA", diffLen2 ≟ 7, "BLLAK", diffLen2 ≟ 0, "", "BASKETBALL")
back3 = If(diffLen3 ≟ 1, "B", diffLen3 ≟ 2, "BL", 3 ≤ diffLen3 ≤ 4, "BLL", 5 ≤ diffLen3 ≤ 6, "BLLA", diffLen3 ≟ 7, "BLLAK", diffLen3 ≟ 0, "", "BASKETBALL")
back4 = If(diffLen4 ≟ 1, "B", diffLen4 ≟ 2, "BL", 3 ≤ diffLen4 ≤ 4, "BLL", 5 ≤ diffLen4 ≤ 6, "BLLA", diffLen4 ≟ 7, "BLLAK", diffLen4 ≟ 0, "", "BASKETBALL")
back5 = If(diffLen5 ≟ 1, "B", diffLen5 ≟ 2, "BL", 3 ≤ diffLen5 ≤ 4, "BLL", 5 ≤ diffLen5 ≤ 6, "BLLA", diffLen5 ≟ 7, "BLLAK", diffLen1 ≟ 0, "", "BASKETBALL")
nicerTable: "\begin{tabular} {|c|c|c|c|c|c|}
\hline
\vphantom{\frac{1}{1}} " + (LaTeX[If[is ≟ 4, "\hphantom{p}"]]) + "\bold{" + (LaTeX[tableHeader(is)]) + "} " + (LaTeX[If[is ≟ 4, "\hphantom{p}"]]) + "
& \cellcolor{" + (LaTeX[If[isClickedOpt1, "#FCE3EC", "#FFFFFF"]]) + "}{\phantom{" + (LaTeX[front1]) + "}" + (LaTeX[currentItems(1)]) + "\phantom{" + (LaTeX[back1]) + "}}
& \cellcolor{" + (LaTeX[If[isClickedOpt2, "#FCE3EC", "#FFFFFF"]]) + "}{\phantom{" + (LaTeX[front2]) + "}" + (LaTeX[currentItems(2)]) + "\phantom{" + (LaTeX[back2]) + "}}
& \cellcolor{" + (LaTeX[If[isClickedOpt3, "#FCE3EC", "#FFFFFF"]]) + "}{\phantom{" + (LaTeX[front3]) + "}" + (LaTeX[currentItems(3)]) + "\phantom{" + (LaTeX[back3]) + "}} 
& \cellcolor{" + (LaTeX[If[isClickedOpt4, "#FCE3EC", "#FFFFFF"]]) + "}{\phantom{" + (LaTeX[front4]) + "}" + (LaTeX[currentItems(4)]) + "\phantom{" + (LaTeX[back4]) + "}}
& \cellcolor{" + (LaTeX[If[isClickedOpt5, "#FCE3EC", "#FFFFFF"]]) + "}{\phantom{" + (LaTeX[front5]) + "}" + (LaTeX[currentItems(5)]) + "\phantom{" + (LaTeX[back5]) + "}} \\
\hline
\vphantom{\frac{1}{1}}\bold{Frecuencia}
& \cellcolor{" + (LaTeX[If[isClickedOpt1, "#FCE3EC", "#FFFFFF"]]) + "}{" + (LaTeX[opt1]) + "} 
& \cellcolor{" + (LaTeX[If[isClickedOpt2, "#FCE3EC", "#FFFFFF"]]) + "}{" + (LaTeX[opt2]) + "}  
& \cellcolor{" + (LaTeX[If[isClickedOpt3, "#FCE3EC", "#FFFFFF"]]) + "}{" + (LaTeX[opt3]) + "} 
& \cellcolor{" + (LaTeX[If[isClickedOpt4, "#FCE3EC", "#FFFFFF"]]) + "}{" + (LaTeX[opt4]) + "} 
& \cellcolor{" + (LaTeX[If[isClickedOpt5, "#FCE3EC", "#FFFFFF"]]) + "}{" + (LaTeX[opt5]) + "} \\
\hline
\end{tabular}"
tabOrder: {textInst, ddMenu, nicerTable, btnOption1, btnOption2, btnOption3, btnOption4, btnOption5, btnNew}