?

$\textsf{The absolute values of the vertical positions of the\\dolphin and the plane are}$

Select the inequality that compares the absolute value of the vertical position of the dolphin to the absolute value of the vertical position of the plane, if the position of the plane is on the right hand  side of the inequality.

Mod(countQuestion, 3) + 1

\textsf{What is the absolute value of the \vertical position of the dolphin?}

\textsf{Compare the absolute values \of the vertical positions of the \dolphin and the plane.}\\vspace{10px}\

\textsf{Complete the statement to \describe the visual.}

#4D4D4D

$\text{Check}$

$\text{NEW PROBLEM}$

Fix position and allow selection for all text objects

Empty all input boxes

$\textsf{Absolute position =}$

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

\text{The absolute value of a number\is its distance from 0.}

#eeeeee

#2E006758

#2EB00020

\text{Drag to start}

\textsf{
The absolute values of the vertical \\vspace{5px}\
positions of the dolphin and the\\vspace{5px}\
plane are}

\textsf{
The absolute value of the vertical \position of the dolphin is\hspace{75px}.}

allRandomSeeds = RandomUniform(0, 0.99, 200)
countQuestion = 0
case1DropDown = Zip((("$\text{" * A) * " }$"), A, {"\phantom{not the same}", "the same.", "not the same."})
case2DropDown = Zip((("$\vphantom{\frac{1}{2}}\(~" * A) * "~\)$"), A, {"\phantom{\lt}", "\lt", "=", "\gt"})
caseNum: Mod[countQuestion, 3] + 1
inputCurrent = Element({{("" * SelectedIndex[case1DropDown])}, {("" * SelectedIndex[case2DropDown])}, {inputString}}, caseNum)
inputValid = true
inputSaved: {}
numRandoms: 5
possibleDolphinPos = Sequence(A, A, -50, 0, 10)
randIndex: (Mod[countQuestion, floor(Length[allRandomSeeds] / numRandoms)] * numRandoms) + 1
currentRandomSeeds = Take(allRandomSeeds, randIndex, randIndex + numRandoms - 1)
indexDolphin: 1 + floor((currentRandomSeeds(2) * (Length[possibleDolphinPos] - 1)))
isSame: 1 + floor((currentRandomSeeds(3) * 2))
possiblePlanePos = Sequence(A, A, 30, 60, 10)
indexPlane: 1 + floor((currentRandomSeeds(1) * Length[possiblePlanePos]))
posPlane = Min(Element[possiblePlanePos, indexPlane], If[isSame ≟ 1, 50, 70])
posDolphin = If(isSame ≟ 1, (-posPlane), Element[Remove[possibleDolphinPos, {(-posPlane)}], indexDolphin])
studentCase3 = NaN
selectCase2 = SelectedIndex(case2DropDown)
selectCase1 = SelectedIndex(case1DropDown)
totalHeight: 180
Anchor1: (0, ((-(375 / 600)) * totalHeight))
Anchor2: Anchor1 + (0, totalHeight)
randomNum1: 1 + floor((currentRandomSeeds(1) * 20))
onboarding: false
PMoveA = (3.4347091871177713, 5.572495645015256)
randomNum2: randomNum1 + 2 + floor((currentRandomSeeds(2) * 10))
validate = false
showanswer = false
showsolution = false
tries = 0
countCorrect = 0
showhint = false
inputCase3 = Textfield(studentCase3)
correct = Element({selectCase1 ≟ isSame + 1, Element[{false, abs(posDolphin) < posPlane, abs(posDolphin) ≟ posPlane, abs(posDolphin) > posPlane}, selectCase2], studentCase3 ≟ abs(posDolphin)}, caseNum)
showbuttons = true
typicalError1: 0
typicalError2: 0
showhinttypicalerror = false
textCountCorrect: "\text{Number correct: " + (LaTeX[countCorrect]) + " }"
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)}])
textHint: "\text{\color{" + (LaTeX[colorOrange]) + "}\bold{Hint}\\" + (LaTeX[If[showhinttypicalerror, helpTextHintTypicalError]]) + "" + (LaTeX[If[showhint ∧ showhinttypicalerror, "\\"]]) + "" + (LaTeX[If[showhint, helpTextHint]]) + "}"
layoutY = Element({200, 180, 160}, caseNum)
layoutX: 450
layoutAppSize = Corner(5)
inputOK: inputCurrent(1) ≠ Element[{"1", "1", "?"}, caseNum] ∧ (inputValid ∨ caseNum ≠ 3)
enableBtnValidate: inputCurrent ≠ inputSaved ∧ inputOK
PMoveB = (4.1638207264560645, 6.136241785204535)
StartA = (3.4347091871177713, 5.572495645015256)
StartB = (4.1638207264560645, 6.136241785204535)
pulsingSpeed: 8
pulsing = 0.1 (slider from 0 to 1, step 0.1)
haloPixels: (pulsing * 7)
onboardingCase: 1
onboardingX: 337
onboardingY: 150
OnboardingTextOffset = onboardingTextOffset(Corner[onboardingText, 1], Corner[onboardingText, 3], onboardingCase, Corner[1], Corner[3], Corner[5])
textQuestion: "" + (LaTeX[Element[{questionCase1, questionCase2, questionCase3}, caseNum]]) + ""
viewbox = Polygon({(-100, -73), (-100, 77), (250, 77), (250, -73)})
dolphinHeight: 20
dolphinX: 50 + floor((currentRandomSeeds(4) * 50))
displayDolphin = Translate(dolphinTemplate, (dolphinX, posDolphin - dolphinHeight))
dolphinGuides = PolyLine((0, posDolphin), (dolphinX + (0.5 * dolphinHeight), posDolphin), (dolphinX + (0.5 * dolphinHeight), 0))
xBalloon: 50 + floor((currentRandomSeeds(4) * 50))
planeWidth: 30
AnchorBalloon: (xBalloon, posPlane)
balloonGuides = PolyLine((0, y(AnchorBalloon)), AnchorBalloon, (x(AnchorBalloon), 0))
solnCase1: "\(\vert " + (LaTeX[posDolphin]) + "\vert\) = " + (LaTeX[If[abs(posDolphin) ≟ abs(posPlane), ((("\vert " * posPlane) * "\vert =") * abs(posDolphin)), (((((("" * abs(posDolphin)) * "\ne ") * posPlane) * "=\vert") * posPlane) * "\vert.")]]) + "\\\textsf{The absolute value of a number \\is its distance from zero. It is\\always greater than or equal to \\zero.}"
solnCase2: "\textsf{The absolute value of the}\\
\textsf{vertical position of the}\\
\textsf{dolphin is } " + (LaTeX[abs(posDolphin)]) + "\textsf{. The absolute}\\
\textsf{value of the vertical position}\\
\textsf{of the plane is }" + (LaTeX[abs(posPlane)]) + ".\\" + (LaTeX[abs(posDolphin)]) + "" + (LaTeX[If[abs(posDolphin) > posPlane, "\gt", If[abs(posDolphin) ≟ posPlane, "=", "\lt"]]]) + "" + (LaTeX[abs(posPlane)]) + ""
solnCase3: "\vert" + (LaTeX[posDolphin]) + "\vert =" + (LaTeX[abs(posDolphin)]) + ".\\\textsf{The absolute value of a number\\is its distance from zero. It is }\\\textsf{always greater 
than or equal to zero.}"
textSolution: "\textsf\bold{Possible Solution}\\" + (LaTeX[Element[{solnCase1, solnCase2, solnCase3}, caseNum]]) + ""
isTypicalError: false
questionCase2B: "\text{
\(\vert " + (LaTeX[posDolphin]) + "\vert\)\hspace{74px}\(\vert " + (LaTeX[posPlane]) + "\vert\)}"
testQuestionB: "" + (LaTeX[Element[{questionCase1B, questionCase2B, questionCase3B}, caseNum]]) + ""
axis = Segment((0, -75), (0, 79))
tabOrder: {textQuestion, case1DropDown, case2DropDown, btnValidate, textHint, textSolution, textCountCorrect, btnNew}
altFeedback: (("\text{" * If[correct, "Your answer is correct. ", ("Your answer is not correct. " * If[tries < 3, "Try again. ", "Maybe next time. "])]) * "}")
altText: "\text{A vertical infinite number line with labels from \(-70\) to \(70\) in increments of 10 appears to the left of an image showing a plane and a dolphin. A horizontal line through 0 on the number line represents sea level.  A horizontal line passing through \(" + (LaTeX[posDolphin]) + "\) touches the dolphin. A horizontal line through \(" + (LaTeX[posPlane]) + "\) touches the plane.}"
axisTicks = Sequence(Segment[(-2, A), (2, A)], A, -70, 70, 10)
maxTries = Element({1, 2, 3}, caseNum)
textFeedback: "" + (LaTeX[If[correct, "$\text{✓ Correct}$", "$\text{✕ " + (If[tries < maxTries, "Try again", "Maybe next time"]) + "}$"]]) + ""
labelBtnValidate: "\text{CHECK (" + (LaTeX[maxTries - tries]) + ")}"
enableInput: tries < maxTries ∧ (¬(validate ∧ correct))

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: expandSegment
expandSegment(A,B,pixelGap,Corner1,Corner3,Corner5)
Input: A, B, pixelGap, Corner1, Corner3, Corner5
Output: newPoly

distanceX: (pixelGap / x(Corner5) * (x(Corner3) - x(Corner1)))
distanceY: (pixelGap / y(Corner5) * (y(Corner3) - y(Corner1)))
pointGap: distanceX
xyScale: distanceY / distanceX
A: (0, 0)
vecAB: B - A
pVec: (20 * UnitVector[(((-y(vecAB))) / xyScale, (x(vecAB) * xyScale))])
pVecAngle = Angle(xAxis, Line[(0, 0), pVec])
realAngle = If(pVecAngle ≟ pi / 2 ∨ pVecAngle ≟ (3 * pi / 2), pVecAngle, atand(tan(pVecAngle) / xyScale))
curveFunction = CurveCartesian((pointGap * cos(u)), ((pointGap * xyScale) * sin(u)), u, 0, (2 * pi))
K: curveFunction(realAngle)
vSpace = Vector(K)
allPoints: {A + vSpace, A - vSpace, B - vSpace, B + vSpace}
newPoly = Polygon(allPoints)

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: 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) * (yTop - y(InputPoint)) / (yTop - yBottom))
xPixels: (x(Corner5) * (x(InputPoint) - xLeft) / (xRight - xLeft))
OutputPixels: (xPixels, yPixels)