\text{Drag into the blank}

#4D4D4D

$\text{Check}$

$\text{NEW PROBLEM}$

Fix position and allow selection for all text objects

Empty all input boxes

$a=\vphantom{b}$

$b=$

Reset app

#006758

#B00020

#252525

#757575

#949494

#E44461

#DA2570

#E66B9E

#3A6ED6

#5991FF

#008475

#0F8538

#00a83c

#5145A8

#6557D2

#8575FF

#903D14

#BD6C43

#C75000

#E07415

#eeeeee

#2E006758

#2EB00020

\text{How can you best describe the relationship shown in the scatter plot?
} 

MoveGL

l3: {(x - 1.5)^(2), 2.5 - (x - 1.5)^(2), x^(3) / 9, 2.5 - x^(3) / 3^(2), sin((3 * x)) + 1.5}
randomb = Shuffle(Sequence[0, 1.25, 0.25])
randomList1 = Shuffle(Flatten[Sequence[{1, 2, 3, 4}, ii, 1, 5]])
countQuestion = 0
f1(x) = If[0 ≤ x ≤ 3, Element[l3, Mod[countQuestion, Length[l3]] + 1]]
randomNum1 = Element(randomList1, Mod[countQuestion, Length[randomList1]] + 1)
RanPositionsOrder = Shuffle(Sequence[4] \ {randomNum1})
randomList2 = Shuffle(Sequence[0, 3, 0.1] \ {Element[Sequence[0, 3, 0.1], Mod[countQuestion, 5] + 1]})
randomn = Shuffle(Sequence[2, 4])
randomm = Shuffle(Sequence[0.5, 3, 0.25])
randomErrors = Shuffle(Flatten[Sequence[Sequence[0, 0.25, 0.05], ii, 1, 5]])
intercept = If(randomNum1 ≠ 1, 3 - Element[randomb, Mod[countQuestion, Length[randomb]] + 1], Element[randomb, Mod[countQuestion, Length[randomb]] + 1])
y3: 3 - intercept
H: (3, y3)
G: (0, intercept)
Cor3 = (4.180287500000001, 3.6069999999999984)
wid: 3
ini: (x(Cor3) - 3 - wid) / 2
F = Point(yAxis)
hei: 0.45
RanPosOrderComplet = Append(randomNum1, RanPositionsOrder)
E = (-0.4283316790324938, 1.994621885465043)
D = (-3.088815691374957, 1.994621885465043)
coeffn = Element(randomn, Mod[countQuestion, 3] + 1)
slope = Slope(Line[G, H])
expressionQ11 = Text((((intercept * "-") * slope) * "x"))
expressionQ1 = Text((((intercept * "+") * slope) * "y"))
droparea = Translate(Polygon[{F, F - (0, hei), F + (wid, (-hei)), F + (wid, 0)}], (0, -0.07))
inputSaved: {NaN}
tableQ9 = TableText(Append[Flatten[Sequence[{"\hspace{-10}y", "\hspace{-10}\times"}, i, 1, coeffn - 1]], "\hspace{-10}y"])
B = (5.000341064524864, 5.69392166828734)
input2 = NaN
input1 = 1
randomNum2 = Element(randomList2, Mod[countQuestion, 15] + 1)
correct1: input1 ≟ randomNum1
validate = false
showanswer = false
showsolution = false
tries = 0
countCorrect = 0
showhint = false
InputBox1 = Textfield(input1)
InputBox2 = Textfield(input2)
correct2: input2 ≟ randomNum2
correct: input1 ≟ randomNum1
showbuttons = true
typicalError1: 0
typicalError2: 0
showhinttypicalerror = false
textCountCorrect: "\text{Number correct: " + (LaTeX[countCorrect]) + " }"
labelBtnValidate: "\text{CHECK (" + (LaTeX[3 - tries]) + ")}"
helpTextHint: "\text{" + (LaTeX[If[randomNum1 ≟ 4, "There is no trend line.", "Study the trend line on the scatter plot."]]) + "}"
pixelsRight: 16
pixelsLeft: 16
pixelsBottom: 16
pixelsTop: 24
layoutY: 242 + 36 + 24
enableInput: tries < 3 ∧ (¬(validate ∧ correct))
layoutX: 11
layoutAppSize = Corner(5)
onboarding = false
pulsingSpeed: 8
pulsing = 0.9 (slider from 0 to 1, step 0.1)
haloPixels: (pulsing * 7)
A = (4.591072725036432, 5.892161020227049)
C = (4.917208433066277, 6.084005554362252)
onboardingX: 430 + 16
onboardingY: 324
onboardingCase = 1
OnboardingTextOffset = onboardingTextOffset(Corner[onboardingText, 1], Corner[onboardingText, 3], onboardingCase, Corner[1], Corner[3], Corner[5])
Cor1 = (-3.9299375000000016, -1.473240000000002)
MoveGL = (2.744312500000001, -0.77496)
vGL: x = x(MoveGL)
p: y = y(MoveGL)
l2 = Sequence((3 + ini, 1.35 + (ii * 0.55) - hei), ii, 0, 3)
PositionsOrder = Sort(l2, RanPosOrderComplet)
P = Vertex(droparea, 2)
isTypicalError: false
IncorrectOptions: A
Options = Zip((("\textsf{" * TT) * "}"), TT, {"POSITIVE LINEAR RELATION", "NEGATIVE LINEAR RELATION", "NONLINEAR RELATION", "NO CORRELATION"})
eq1: x = x(Corner[1]) + (x(Corner[2] - Corner[1]) / 800 * 16)
fakexAxis = Segment((0, 0), (3, 0))
fakeyAxis = Segment((0, 0), (0, 3))
vGL' = Translate(vGL, Vector[(Vector[Corner[1], Corner[2]] / 800 * 32)])
textHint: "\textsf{\color{" + (LaTeX[colorOrange]) + "}\bold{Hint}\\" + (LaTeX[If[showhinttypicalerror, helpTextHintTypicalError]]) + "" + (LaTeX[If[showhint ∧ showhinttypicalerror, "\\"]]) + "" + (LaTeX[If[showhint, helpTextHint]]) + "}}"
solOptions: {"This scatter plot shows a Positive Linear Relation as\\the trend line is a straight line with a positive slope.", "This scatter plot shows a Negative Linear Relation as\\the trend line is a straight line with a negative slope.", "This scatter plot shows a NonLinear Relation as the\\trend line is not a straight line.", "This plot shows no correlation as there is no trend\\visible. Data points are scattered all over the graph."}
textSolution: "\textsf{\bold{Solution}\\\\" + (LaTeX[Element[solOptions, randomNum1]]) + "}"
linCoScatter = KeepIf(0.1 ≤ y(PP) ≤ 2.9, PP, Zip[(ii, (slope * ii) + intercept + ee), ii, randomList2, ee, randomErrors])
nonlinScatter = KeepIf(0.1 ≤ y(PP) ≤ 2.9, PP, Zip[(ii, f1(ii) + ee), ii, randomList2, ee, randomErrors])
labelx = Text("\bold{x}", (3.2, -0.07), true, true, 0, 1)
labely = Text("\bold{y}", (0.2, 3), true, true, 0, 0)
flin = FitLineY(linCoScatter)
q1 = Polygon({(0.05, 0.05), (2.95, 0.05), (2.95, 2.95), (0.05, 2.95)})
noCorScatter2 = KeepIf(0.1 ≤ y(PP) ≤ 2.9, PP, Zip[(ii, (1.5 * sin((1000 * ii))) + 1.5 + ee), ii, randomList2, ee, randomErrors])
noCorScatter = Mirror(noCorScatter2, y = 1.5)
nonLinop: Mod[countQuestion, 5] + 1
fitsin = FitSin(nonlinScatter)
fitquad = FitPoly(nonlinScatter, If[nonLinop ≤ 2, 2, 3])
text4 = Text(Element[Options, 4], (0, 0), true, true)
text3 = Text(Element[Options, 3], (0, 0), true, true)
text2 = Text(Element[Options, 2], (0, 0), true, true)
text1 = Text(Element[Options, 1], (0, 0), true, true)
p' = Translate(p, Vector[(Vector[Corner[4], Corner[1]] / 500 * 16)])
inputCurrent: {input1}
enableBtnValidate: inputSaved ≠ inputCurrent
textFeedback: "" + (LaTeX[If[correct, "$\text{✓ Correct}$", "$\text{✕ " + (If[tries < 3, (((("Try again (" * (3 - tries)) * " tr") * If[3 - tries ≟ 1, "y", "ies"]) * " left)"), "Maybe next time"]) + "}$"]]) + ""

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

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

Tool: sectorPixels
sectorPixels(Midpoint,B,C,pixelRadius,Corner1,Corner3,Corner5
Input: A, B, C, pixelRadius, Corner1, Corner3, Corner5
Output: newSector

pointRadius: (pixelRadius / x(Corner5) * (x(Corner3) - x(Corner1)))
BPrime: A + (pointRadius * UnitVector[B - A])
newSector = CircleSector(A, BPrime, C)

Tool: onboardingTextOffset
onboardingTextOffset(textCorner1,textCorner3,case,corner1,corner3,corner5)
Input: CornerText1, CornerText3, case, Corner1, Corner3, Corner5
Output: TextOffset

xPixels: ((x(CornerText3) - x(CornerText1)) * x(Corner5) / (x(Corner3) - x(Corner1)))
yPixels: ((y(CornerText3) - y(CornerText1)) * y(Corner5) / (y(Corner3) - y(Corner1)))
xOffset = Element({27, (-xPixels) + 2, 16 - xPixels / 2, 16 - xPixels / 2}, case)
yOffset = Element({-23, -23, yPixels - 27, -49}, case)
TextOffset: (xOffset, yOffset)

Tool: expandQuad
expandQuad(A,B,C,D,pixelGap,Corner1,Corner3,Corner5)
Input: A, B, C, D, pixelGap, Corner1, Corner3, Corner5
Output: newPolygon

Corner5: (800, 500)
Corner3: (7, 6)
Corner1: (-4, -2)
distanceY: (pixelGap / y(Corner5) * (y(Corner3) - y(Corner1)))
distanceX: (pixelGap / x(Corner5) * (x(Corner3) - x(Corner1)))
pointGap: distanceX
allVerts: {A, B, C, D}
concaveAngles = Zip(Angle[I, J, K] > 180°, I, Append[allVerts(-1), allVerts], J, allVerts, K, Append[Take[allVerts, 2], allVerts(1)])
allVecs = Zip(Vector[J, K], J, allVerts, K, Append[Take[allVerts, 2], allVerts(1)])
pVecs = Zip(Vector[UnitOrthogonalVector[A]], Vector[A], allVecs)
xyScale: (distanceY) / (distanceX)
circTemplate = CurveCartesian((pointGap * cos(t)), ((xyScale * pointGap) * sin(t)), t, 0, (2 * pi))
scaledVecs = Zip(Vector[(x(K), (xyScale * y(K)))], Vector[K], pVecs)
vPointsPre = Zip(A - (pointGap * B), A, allVerts, B, Append[scaledVecs(-1), scaledVecs])
vPointsPost = Zip(A - (pointGap * B), A, allVerts, Vector[B], scaledVecs)
endAngles = Zip(Angle[M + (1, 0), M, K], K, vPointsPost, M, allVerts)
startAngles = Zip(Angle[M + (1, 0), M, K], K, vPointsPre, J, vPointsPost, M, allVerts)
roundedCornersConvex = Zip(Sequence[circTemplate(K) + A, K, B, C + If[B > C, (2 * pi), 0], (C + If[B > C, (2 * pi), 0] - B) / 4], A, allVerts, B, endAngles, C, startAngles)
roundedCornersConcave = Zip(Sequence[circTemplate(K) + A, K, B, C + If[B > C, (2 * pi), 0], (C + If[B > C, (2 * pi), 0] - B) / 4], A, allVerts, B, startAngles, C, endAngles)
cornerAngles = Zip(Angle[A, B, C], A, vPointsPre, B, allVerts, C, vPointsPost)
cornerPoints = Flatten(Zip[If[¬Concave, {Element[D, 3]}, If[A < pi / 3 ∨ (¬Concave), {Element[C, 3]}, C]], A, cornerAngles, C, roundedCornersConcave, D, roundedCornersConvex, Concave, concaveAngles])
newPolygon = Polygon(cornerPoints)