$\textsf{Your Solution}$

#4D4D4D

$\text{Check}$

$\text{NUEVO}$

Fix position and allow selection for all text objects

Empty all input boxes

\text{\bold{Solución correcta}}

Reset app

\text{This is the error specific hint}

#006758

#B00020

#252525

#757575

#949494

#E44461

#DA2570

#E66B9E

#3A6ED6

#5991FF

#008475

#0F8538

#00a83c

#5145A8

#6557D2

#8575FF

#903D14

#BD6C43

#C75000

#E07415

#eeeeee

#2E006758

#2EB00020

\text{Tu respuesta}

randomList1 = Shuffle(Sequence[3, 8])
randomList2 = Shuffle(Sequence[15])
yourSol = false
l1: {"Recuerda colorear todas las\\partes del conjunto A", "Recuerda colorear todas las\\partes del conjunto B", "A∩B es la \textit{intersección} de\\A y B.", "A∪B es la \textit{unión} de A y B.", "A\(-\)B es la \textit{diferencia} de A \\menos B.", "B\(-\)A es la \textit{diferencia} de B \\menos A.", "A’ es el \textit{complemento} de A.", "B’ es el \textit{complemento} de B."}
countQuestion = 0
randomNum1 = Element(Flatten[{1, 2, randomList1}], Mod[countQuestion, 8] + 1)
SetsCodes: {{false, true, true, false}, {false, false, true, true}, {false, false, true, false}, {false, true, true, true}, {false, true, false, false}, {false, false, false, true}, {true, false, false, true}, {true, true, false, false}}
activeBminA = false
activeInt = false
activeAminB = false
activeU = false
activeRegions: {activeU, activeAminB, activeInt, activeBminA}
expected: SetsCodes(randomNum1)
inputSaved: {false, false, false, false}
input1 = NaN
input2 = NaN
randomNum2 = Element(randomList2, Mod[countQuestion, 15] + 1)
correct1: input1 ≟ randomNum1
validate = false
showanswer = false
showsolution = false
tries = 0
countCorrect = 0
showhint = false
correct2: input2 ≟ randomNum2
correct: expected ≟ activeRegions
showbuttons = true
typicalError1: 0
typicalError2: 0
showhinttypicalerror = false
helpTextHint: "\text{" + (LaTeX[Element[l1, randomNum1]]) + "}"
pixelsRight: 16
pixelsLeft: 16
pixelsBottom: 16
pixelsTop: 24
borderBox = Polygon(Zip[PixelsToPoint[Corner[1], Corner[3], Corner[5], A], A, {(pixelsLeft, pixelsTop), (pixelsLeft, y(Corner[5]) - pixelsBottom), Corner[5] - (pixelsRight, pixelsBottom), (x(Corner[5]) - pixelsRight, pixelsTop)}])
layoutY: 123
layoutX: 16 + 400
layoutAppSize = Corner(5)
textFeedback: "" + (LaTeX[If[correct, "$\text{✓ Correcto}$", "$\text{✕ " + (If[tries < 3, "Reinténtalo", "Quizás la próxima vez"]) + "}$"]]) + ""
U = Polygon({(0, 0), (9, 0), (9, 6), (0, 6)})
Cent1_{1} = (3, 3)
Point1_{1} = (5, 3)
circ1_{1} = Circle(Cent1_{1}, Point1_{1})
Cent2_{1} = (6, 3)
Point2_{1} = (4, 3)
circ2_{1} = Circle(Cent2_{1}, Point2_{1})
AminB_{1}(x, y) = (x - x(Cent1_{1}))^(2) + (y - y(Cent1_{1}))^(2) ≤ Distance[Cent1_{1}, Point1_{1}]^(2) ∧ (¬((x - x(Cent2_{1}))^(2) + (y - y(Cent2_{1}))^(2) ≤ Distance[Point2_{1}, Cent2_{1}]^(2)))
Int_{1}(x, y) = (x - x(Cent1_{1}))^(2) + (y - y(Cent1_{1}))^(2) ≤ Distance[Cent1_{1}, Point1_{1}]^(2) ∧ (x - x(Cent2_{1}))^(2) + (y - y(Cent2_{1}))^(2) ≤ Distance[Point2_{1}, Cent2_{1}]^(2)
BminA_{1}(x, y) = (¬((x - x(Cent1_{1}))^(2) + (y - y(Cent1_{1}))^(2) ≤ Distance[Cent1_{1}, Point1_{1}]^(2))) ∧ (x - x(Cent2_{1}))^(2) + (y - y(Cent2_{1}))^(2) ≤ Distance[Point2_{1}, Cent2_{1}]^(2)
U': U
colorActive: {133, 117, 255}
textsSet: {"A", "B", "A\,\cap\,B", "A\,\cup\,B", "A\(-\)B", "B\(-\)A", "A'", "B'"}
currentlyColoredSet: "$" + (LaTeX[Element[textsSet, IndexOf[activeRegions, SetsCodes]]]) + "$"
LabelUniversal = Text("U", (0, 6), true, true, 1, 1)
LabelA = Text("A", (1, 4.5), true, true, 1, 1)
labelB = Text("B", (7.5, 4.5), true, true, 1, 1)
isTypicalError: false
moveGuideline = (9.123749411584239, 7.09544502027953)
hGuideLine: y = y(moveGuideline)
vGuideLine: x = x(moveGuideline)
AppSize = Corner(5)
hGuideLine' = Translate(hGuideLine, Vector[(Vector[Corner[4], Corner[1]] / 500 * 16)])
USol = Translate(U, (10, 0))
enableBtnValidate: activeRegions ≠ inputSaved
inputCurrent: activeRegions
enableInput: tries < 3 ∧ (¬(validate ∧ correct))
U'' = Translate(U', (10, 0))
Cor1 = (-0.4872259656920096, -3.7692165196779155)
Cor3 = (19.483631961115776, 8.731247993711325)
USolBlack: USol
BminASol = Translate(BminA_{1}, (10, 0))
IntSol = Translate(Int_{1}, (10, 0))
AminBSol = Translate(AminB_{1}, (10, 0))
c = Translate(circ1_{1}, (10, 0))
d = Translate(circ2_{1}, (10, 0))
textFeedback2_{1}: "" + (LaTeX[textFeedback]) + ""
textQuestion: "\text{Selecciona las partes del diagrama de Venn\\que corresponden al conjunto " + (LaTeX[Element[textsSet, randomNum1]]) + ". } "
textCountCorrect: "\text{Correctos: " + (LaTeX[countCorrect]) + " }"
textHint: "\text{\color{" + (LaTeX[colorOrange]) + "}\bold{Pista}\\" + (LaTeX[If[showhinttypicalerror, helpTextHintTypicalError]]) + "" + (LaTeX[If[showhint ∧ showhinttypicalerror, "\\"]]) + "" + (LaTeX[If[showhint, helpTextHint]]) + "}"
labelBtnValidate: "\text{CHEQUEAR (" + (LaTeX[3 - tries]) + ")}"

Tool: PixelsToPoint
PixelsToPoint(Corner1,Corner3,Corner5,PixelCoords)
Input: Corner1, Corner3, Corner5, InputPixels
Output: OutputPoint

InputPixels: (100, 200)
xRight: x(Corner3)
xLeft: x(Corner1)
yTop: y(Corner3)
yBottom: y(Corner1)
yCoord: yTop - (y(InputPixels) / y(Corner5) * (yTop - yBottom))
xCoord: (x(InputPixels) / x(Corner5) * (xRight - xLeft)) + xLeft
OutputPoint: (xCoord, yCoord)

Tool: PixelsToPoint (command PixelsToPoint1)
PixelsToPoint(Corner1,Corner3,Corner5,PixelCoords)
Input: Corner1, Corner3, Corner5, InputPixels
Output: OutputPoint

InputPixels: (100, 200)
xRight: x(Corner3)
xLeft: x(Corner1)
yTop: y(Corner3)
yBottom: y(Corner1)
yCoord: yTop - (y(InputPixels) / y(Corner5) * (yTop - yBottom))
xCoord: (x(InputPixels) / x(Corner5) * (xRight - xLeft)) + xLeft
OutputPoint: (xCoord, yCoord)

Tool: PointToPixels
PointToPixels(Corner1,Corner3,Corner5,InputPoint)
Input: Corner1, Corner3, Corner5, InputPoint
Output: OutputPixels

Corner1: (-5, -5)
Corner3: (16, 6)
Corner5: (300, 200)
xLeft: x(Corner1)
xRight: x(Corner3)
yTop: y(Corner3)
yBottom: y(Corner1)
yPixels: (y(Corner5) * (y(InputPoint) - yBottom) / (yTop - yBottom))
xPixels: (x(Corner5) * (x(InputPoint) - xLeft) / (xRight - xLeft))
OutputPixels: (xPixels, yPixels)