math-exercises 3.0.124 → 3.0.126
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/lib/exercises/math/calcul/arithmetics/primeNumbers.d.ts +1 -1
- package/lib/exercises/math/calcul/arithmetics/primeNumbers.d.ts.map +1 -1
- package/lib/exercises/math/calcul/arithmetics/primeNumbers.js +20 -14
- package/lib/exercises/math/calcul/fractions/fractionsMix.js +1 -1
- package/lib/exercises/math/calcul/fractions/fractionsSumsPrimeDenominators.d.ts.map +1 -1
- package/lib/exercises/math/calcul/fractions/fractionsSumsPrimeDenominators.js +61 -1
- package/lib/exercises/math/calcul/mentalCaluls/index.d.ts +1 -0
- package/lib/exercises/math/calcul/mentalCaluls/index.d.ts.map +1 -1
- package/lib/exercises/math/calcul/mentalCaluls/index.js +1 -0
- package/lib/exercises/math/calcul/mentalCaluls/mentalProgramSolve.d.ts +15 -0
- package/lib/exercises/math/calcul/mentalCaluls/mentalProgramSolve.d.ts.map +1 -0
- package/lib/exercises/math/calcul/mentalCaluls/mentalProgramSolve.js +217 -0
- package/lib/exercises/math/calcul/ordering/compareA10N.d.ts +16 -0
- package/lib/exercises/math/calcul/ordering/compareA10N.d.ts.map +1 -0
- package/lib/exercises/math/calcul/ordering/compareA10N.js +327 -0
- package/lib/exercises/math/calcul/ordering/compareABUsingQuotient.d.ts +8 -0
- package/lib/exercises/math/calcul/ordering/compareABUsingQuotient.d.ts.map +1 -0
- package/lib/exercises/math/calcul/ordering/compareABUsingQuotient.js +221 -0
- package/lib/exercises/math/calcul/ordering/compareFracABWithFracAPlusCBPlusC.d.ts +9 -0
- package/lib/exercises/math/calcul/ordering/compareFracABWithFracAPlusCBPlusC.d.ts.map +1 -0
- package/lib/exercises/math/calcul/ordering/compareFracABWithFracAPlusCBPlusC.js +135 -0
- package/lib/exercises/math/calcul/ordering/compareFracAndDec.d.ts +29 -0
- package/lib/exercises/math/calcul/ordering/compareFracAndDec.d.ts.map +1 -0
- package/lib/exercises/math/calcul/ordering/compareFracAndDec.js +367 -0
- package/lib/exercises/math/calcul/ordering/comparePowersOfFracs.d.ts +12 -0
- package/lib/exercises/math/calcul/ordering/comparePowersOfFracs.d.ts.map +1 -0
- package/lib/exercises/math/calcul/ordering/comparePowersOfFracs.js +164 -0
- package/lib/exercises/math/calcul/ordering/compareWithSquareRoots.d.ts +9 -0
- package/lib/exercises/math/calcul/ordering/compareWithSquareRoots.d.ts.map +1 -0
- package/lib/exercises/math/calcul/ordering/compareWithSquareRoots.js +140 -0
- package/lib/exercises/math/calcul/ordering/index.d.ts +6 -0
- package/lib/exercises/math/calcul/ordering/index.d.ts.map +1 -1
- package/lib/exercises/math/calcul/ordering/index.js +6 -0
- package/lib/exercises/math/calcul/rounding/estimateAroundPow10NTimesAroundPow10N.d.ts +9 -0
- package/lib/exercises/math/calcul/rounding/estimateAroundPow10NTimesAroundPow10N.d.ts.map +1 -0
- package/lib/exercises/math/calcul/rounding/estimateAroundPow10NTimesAroundPow10N.js +84 -0
- package/lib/exercises/math/calcul/rounding/estimatePow10NPlusPow10MinusN.d.ts +8 -0
- package/lib/exercises/math/calcul/rounding/estimatePow10NPlusPow10MinusN.d.ts.map +1 -0
- package/lib/exercises/math/calcul/rounding/estimatePow10NPlusPow10MinusN.js +90 -0
- package/lib/exercises/math/calcul/rounding/index.d.ts +2 -0
- package/lib/exercises/math/calcul/rounding/index.d.ts.map +1 -1
- package/lib/exercises/math/calcul/rounding/index.js +2 -0
- package/lib/exercises/math/calculLitteral/equation/equationFromProblem.d.ts +13 -0
- package/lib/exercises/math/calculLitteral/equation/equationFromProblem.d.ts.map +1 -0
- package/lib/exercises/math/calculLitteral/equation/equationFromProblem.js +414 -0
- package/lib/exercises/math/calculLitteral/equation/index.d.ts +1 -0
- package/lib/exercises/math/calculLitteral/equation/index.d.ts.map +1 -1
- package/lib/exercises/math/calculLitteral/equation/index.js +1 -0
- package/lib/exercises/math/calculLitteral/factorisation/factorizeAX2PlusBX.d.ts +10 -0
- package/lib/exercises/math/calculLitteral/factorisation/factorizeAX2PlusBX.d.ts.map +1 -0
- package/lib/exercises/math/calculLitteral/factorisation/factorizeAX2PlusBX.js +70 -0
- package/lib/exercises/math/calculLitteral/factorisation/index.d.ts +1 -0
- package/lib/exercises/math/calculLitteral/factorisation/index.d.ts.map +1 -1
- package/lib/exercises/math/calculLitteral/factorisation/index.js +1 -0
- package/lib/exercises/math/calculLitteral/index.d.ts +2 -0
- package/lib/exercises/math/calculLitteral/index.d.ts.map +1 -1
- package/lib/exercises/math/calculLitteral/index.js +2 -0
- package/lib/exercises/math/calculLitteral/isolate/index.d.ts +2 -1
- package/lib/exercises/math/calculLitteral/isolate/index.d.ts.map +1 -1
- package/lib/exercises/math/calculLitteral/isolate/index.js +2 -1
- package/lib/exercises/math/calculLitteral/isolate/isolateUInInvXPlusInvYEqualsInvU.d.ts +8 -0
- package/lib/exercises/math/calculLitteral/isolate/isolateUInInvXPlusInvYEqualsInvU.d.ts.map +1 -0
- package/lib/exercises/math/calculLitteral/isolate/isolateUInInvXPlusInvYEqualsInvU.js +107 -0
- package/lib/exercises/math/calculLitteral/isolate/isolateXInInvXPlusInvYEqualsInvU.d.ts +7 -0
- package/lib/exercises/math/calculLitteral/isolate/isolateXInInvXPlusInvYEqualsInvU.d.ts.map +1 -0
- package/lib/exercises/math/calculLitteral/isolate/isolateXInInvXPlusInvYEqualsInvU.js +80 -0
- package/lib/exercises/math/calculLitteral/ordering/compareAMinusB.d.ts +10 -0
- package/lib/exercises/math/calculLitteral/ordering/compareAMinusB.d.ts.map +1 -0
- package/lib/exercises/math/calculLitteral/ordering/compareAMinusB.js +182 -0
- package/lib/exercises/math/calculLitteral/ordering/compareFromPiMinusFrac.d.ts +9 -0
- package/lib/exercises/math/calculLitteral/ordering/compareFromPiMinusFrac.d.ts.map +1 -0
- package/lib/exercises/math/calculLitteral/ordering/compareFromPiMinusFrac.js +144 -0
- package/lib/exercises/math/calculLitteral/ordering/index.d.ts +3 -0
- package/lib/exercises/math/calculLitteral/ordering/index.d.ts.map +1 -0
- package/lib/exercises/math/calculLitteral/ordering/index.js +2 -0
- package/lib/exercises/math/calculLitteral/simplifying/compareATimes0.d.ts +11 -0
- package/lib/exercises/math/calculLitteral/simplifying/compareATimes0.d.ts.map +1 -0
- package/lib/exercises/math/calculLitteral/simplifying/compareATimes0.js +120 -0
- package/lib/exercises/math/calculLitteral/simplifying/compareFracXA.d.ts +8 -0
- package/lib/exercises/math/calculLitteral/simplifying/compareFracXA.d.ts.map +1 -0
- package/lib/exercises/math/calculLitteral/simplifying/compareFracXA.js +67 -0
- package/lib/exercises/math/calculLitteral/simplifying/compareMinusA.d.ts +11 -0
- package/lib/exercises/math/calculLitteral/simplifying/compareMinusA.d.ts.map +1 -0
- package/lib/exercises/math/calculLitteral/simplifying/compareMinusA.js +114 -0
- package/lib/exercises/math/calculLitteral/simplifying/index.d.ts +5 -0
- package/lib/exercises/math/calculLitteral/simplifying/index.d.ts.map +1 -1
- package/lib/exercises/math/calculLitteral/simplifying/index.js +5 -0
- package/lib/exercises/math/calculLitteral/simplifying/pickSameAsAPercentOfB.d.ts +13 -0
- package/lib/exercises/math/calculLitteral/simplifying/pickSameAsAPercentOfB.d.ts.map +1 -0
- package/lib/exercises/math/calculLitteral/simplifying/pickSameAsAPercentOfB.js +125 -0
- package/lib/exercises/math/calculLitteral/simplifying/pickSameAsInverseOfFracAB.d.ts +14 -0
- package/lib/exercises/math/calculLitteral/simplifying/pickSameAsInverseOfFracAB.d.ts.map +1 -0
- package/lib/exercises/math/calculLitteral/simplifying/pickSameAsInverseOfFracAB.js +148 -0
- package/lib/exercises/math/calculLitteral/writing/writeLitExpFromFrenchExp.d.ts +5 -27
- package/lib/exercises/math/calculLitteral/writing/writeLitExpFromFrenchExp.d.ts.map +1 -1
- package/lib/exercises/math/calculLitteral/writing/writeLitExpFromFrenchExp.js +178 -241
- package/lib/exercises/math/conversion/index.d.ts +4 -0
- package/lib/exercises/math/conversion/index.d.ts.map +1 -1
- package/lib/exercises/math/conversion/index.js +4 -0
- package/lib/exercises/math/conversion/kmPerMinToKmPerHourConversion.d.ts +8 -0
- package/lib/exercises/math/conversion/kmPerMinToKmPerHourConversion.d.ts.map +1 -0
- package/lib/exercises/math/conversion/kmPerMinToKmPerHourConversion.js +98 -0
- package/lib/exercises/math/conversion/minutesToHours.d.ts +10 -0
- package/lib/exercises/math/conversion/minutesToHours.d.ts.map +1 -0
- package/lib/exercises/math/conversion/minutesToHours.js +150 -0
- package/lib/exercises/math/conversion/prefixToNumber.d.ts +15 -0
- package/lib/exercises/math/conversion/prefixToNumber.d.ts.map +1 -0
- package/lib/exercises/math/conversion/prefixToNumber.js +233 -0
- package/lib/exercises/math/conversion/secondsToHours.d.ts +10 -0
- package/lib/exercises/math/conversion/secondsToHours.d.ts.map +1 -0
- package/lib/exercises/math/conversion/secondsToHours.js +150 -0
- package/lib/exercises/math/conversion/volumeConversion.d.ts.map +1 -1
- package/lib/exercises/math/conversion/volumeConversion.js +7 -1
- package/lib/exercises/math/dataRepresentations/barChartInterpreting.d.ts +50 -0
- package/lib/exercises/math/dataRepresentations/barChartInterpreting.d.ts.map +1 -0
- package/lib/exercises/math/dataRepresentations/barChartInterpreting.js +517 -0
- package/lib/exercises/math/dataRepresentations/boxPlotInterpreting.d.ts +7 -0
- package/lib/exercises/math/dataRepresentations/boxPlotInterpreting.d.ts.map +1 -0
- package/lib/exercises/math/dataRepresentations/boxPlotInterpreting.js +223 -0
- package/lib/exercises/math/dataRepresentations/cartesianGraphExtremaReading.d.ts +10 -0
- package/lib/exercises/math/dataRepresentations/cartesianGraphExtremaReading.d.ts.map +1 -0
- package/lib/exercises/math/dataRepresentations/cartesianGraphExtremaReading.js +139 -0
- package/lib/exercises/math/dataRepresentations/dataToGraphGraphToData.d.ts +8 -0
- package/lib/exercises/math/dataRepresentations/dataToGraphGraphToData.d.ts.map +1 -0
- package/lib/exercises/math/dataRepresentations/dataToGraphGraphToData.js +133 -0
- package/lib/exercises/math/dataRepresentations/graphReading.d.ts +8 -0
- package/lib/exercises/math/dataRepresentations/graphReading.d.ts.map +1 -0
- package/lib/exercises/math/dataRepresentations/graphReading.js +136 -0
- package/lib/exercises/math/dataRepresentations/halfPieChartCommenting.d.ts +18 -0
- package/lib/exercises/math/dataRepresentations/halfPieChartCommenting.d.ts.map +1 -0
- package/lib/exercises/math/dataRepresentations/halfPieChartCommenting.js +228 -0
- package/lib/exercises/math/dataRepresentations/halfPieChartReading.d.ts +8 -0
- package/lib/exercises/math/dataRepresentations/halfPieChartReading.d.ts.map +1 -0
- package/lib/exercises/math/dataRepresentations/halfPieChartReading.js +213 -0
- package/lib/exercises/math/dataRepresentations/histogramReading.d.ts +9 -0
- package/lib/exercises/math/dataRepresentations/histogramReading.d.ts.map +1 -0
- package/lib/exercises/math/dataRepresentations/histogramReading.js +163 -0
- package/lib/exercises/math/dataRepresentations/index.d.ts +10 -0
- package/lib/exercises/math/dataRepresentations/index.d.ts.map +1 -1
- package/lib/exercises/math/dataRepresentations/index.js +10 -0
- package/lib/exercises/math/dataRepresentations/plausibleGraph.d.ts +9 -0
- package/lib/exercises/math/dataRepresentations/plausibleGraph.d.ts.map +1 -0
- package/lib/exercises/math/dataRepresentations/plausibleGraph.js +145 -0
- package/lib/exercises/math/dataRepresentations/scatterPlotCommenting.d.ts +9 -0
- package/lib/exercises/math/dataRepresentations/scatterPlotCommenting.d.ts.map +1 -0
- package/lib/exercises/math/dataRepresentations/scatterPlotCommenting.js +308 -0
- package/lib/exercises/math/derivation/derivative/exp/expDerivativeFour.d.ts.map +1 -1
- package/lib/exercises/math/derivation/derivative/exp/expDerivativeFour.js +10 -5
- package/lib/exercises/math/functions/affines/coordsOfPointOnAffineFindX.d.ts +8 -0
- package/lib/exercises/math/functions/affines/coordsOfPointOnAffineFindX.d.ts.map +1 -0
- package/lib/exercises/math/functions/affines/coordsOfPointOnAffineFindX.js +103 -0
- package/lib/exercises/math/functions/affines/coordsOfPointOnAffineFindY.d.ts +8 -0
- package/lib/exercises/math/functions/affines/coordsOfPointOnAffineFindY.d.ts.map +1 -0
- package/lib/exercises/math/functions/affines/coordsOfPointOnAffineFindY.js +100 -0
- package/lib/exercises/math/functions/affines/drawAffineFromLitExp.js +5 -5
- package/lib/exercises/math/functions/affines/drawAffineFromPointAndLeadingCoeff.d.ts +16 -0
- package/lib/exercises/math/functions/affines/drawAffineFromPointAndLeadingCoeff.d.ts.map +1 -0
- package/lib/exercises/math/functions/affines/drawAffineFromPointAndLeadingCoeff.js +215 -0
- package/lib/exercises/math/functions/affines/drawAffineFromProgCalc.d.ts +13 -0
- package/lib/exercises/math/functions/affines/drawAffineFromProgCalc.d.ts.map +1 -0
- package/lib/exercises/math/functions/affines/drawAffineFromProgCalc.js +206 -0
- package/lib/exercises/math/functions/affines/index.d.ts +7 -0
- package/lib/exercises/math/functions/affines/index.d.ts.map +1 -1
- package/lib/exercises/math/functions/affines/index.js +7 -0
- package/lib/exercises/math/functions/affines/recognizeExprAffine.d.ts +20 -0
- package/lib/exercises/math/functions/affines/recognizeExprAffine.d.ts.map +1 -0
- package/lib/exercises/math/functions/affines/recognizeExprAffine.js +284 -0
- package/lib/exercises/math/functions/affines/representationOfAffine.d.ts +13 -0
- package/lib/exercises/math/functions/affines/representationOfAffine.d.ts.map +1 -0
- package/lib/exercises/math/functions/affines/representationOfAffine.js +184 -0
- package/lib/exercises/math/functions/basics/coordsOfPointOnCurveFindY.d.ts +14 -0
- package/lib/exercises/math/functions/basics/coordsOfPointOnCurveFindY.d.ts.map +1 -0
- package/lib/exercises/math/functions/basics/coordsOfPointOnCurveFindY.js +216 -0
- package/lib/exercises/math/functions/basics/findZeroesProductQuotient.d.ts.map +1 -1
- package/lib/exercises/math/functions/basics/findZeroesProductQuotient.js +29 -2
- package/lib/exercises/math/functions/basics/index.d.ts +1 -0
- package/lib/exercises/math/functions/basics/index.d.ts.map +1 -1
- package/lib/exercises/math/functions/basics/index.js +1 -0
- package/lib/exercises/math/functions/basics/inverseImageFunctionGeogebra.d.ts.map +1 -1
- package/lib/exercises/math/functions/basics/inverseImageFunctionGeogebra.js +72 -61
- package/lib/exercises/math/functions/composition/functionComposition.d.ts +8 -0
- package/lib/exercises/math/functions/composition/functionComposition.d.ts.map +1 -0
- package/lib/exercises/math/functions/composition/functionComposition.js +238 -0
- package/lib/exercises/math/functions/composition/index.d.ts +2 -0
- package/lib/exercises/math/functions/composition/index.d.ts.map +1 -0
- package/lib/exercises/math/functions/composition/index.js +1 -0
- package/lib/exercises/math/functions/index.d.ts +1 -0
- package/lib/exercises/math/functions/index.d.ts.map +1 -1
- package/lib/exercises/math/functions/index.js +1 -0
- package/lib/exercises/math/functions/trinoms/roots/rootsFromDevForm.d.ts.map +1 -1
- package/lib/exercises/math/functions/trinoms/roots/rootsFromDevForm.js +41 -16
- package/lib/exercises/math/functions/trinoms/roots/rootsReading.d.ts.map +1 -1
- package/lib/exercises/math/functions/trinoms/roots/rootsReading.js +3 -2
- package/lib/exercises/math/functions/trinoms/sign/trinomSignFromFacto.d.ts +1 -0
- package/lib/exercises/math/functions/trinoms/sign/trinomSignFromFacto.d.ts.map +1 -1
- package/lib/exercises/math/functions/trinoms/sign/trinomSignFromFacto.js +21 -13
- package/lib/exercises/math/geometry/angles/anglesUsingIsParallel.d.ts +23 -0
- package/lib/exercises/math/geometry/angles/anglesUsingIsParallel.d.ts.map +1 -0
- package/lib/exercises/math/geometry/angles/anglesUsingIsParallel.js +448 -0
- package/lib/exercises/math/geometry/angles/index.js +2 -0
- package/lib/exercises/math/geometry/angles/isParallelUsingAngles.d.ts +23 -0
- package/lib/exercises/math/geometry/angles/isParallelUsingAngles.d.ts.map +1 -0
- package/lib/exercises/math/geometry/angles/isParallelUsingAngles.js +402 -0
- package/lib/exercises/math/geometry/cartesian/placeAbscissOnSemiLine.d.ts +9 -6
- package/lib/exercises/math/geometry/cartesian/placeAbscissOnSemiLine.d.ts.map +1 -1
- package/lib/exercises/math/geometry/cartesian/placeAbscissOnSemiLine.js +140 -60
- package/lib/exercises/math/geometry/convexity/convexityQuadrinomialsGeo.js +1 -1
- package/lib/exercises/math/geometry/perimeters/circleCircumference.d.ts.map +1 -1
- package/lib/exercises/math/geometry/perimeters/circleCircumference.js +15 -7
- package/lib/exercises/math/geometry/shapes/basicShapesNaming.d.ts.map +1 -1
- package/lib/exercises/math/geometry/shapes/basicShapesNaming.js +5 -3
- package/lib/exercises/math/geometry/vectors/colinearity/colinearityFromPicture.d.ts.map +1 -1
- package/lib/exercises/math/geometry/vectors/colinearity/colinearityFromPicture.js +121 -104
- package/lib/exercises/math/geometry/vectors/vectorRepresentative.d.ts.map +1 -1
- package/lib/exercises/math/geometry/vectors/vectorRepresentative.js +3 -2
- package/lib/exercises/math/percent/evolutions/evolutionToCM.js +2 -2
- package/lib/exercises/math/percent/findProportion.d.ts +6 -1
- package/lib/exercises/math/percent/findProportion.d.ts.map +1 -1
- package/lib/exercises/math/percent/findProportion.js +162 -45
- package/lib/exercises/math/powers/calculateNegativePower.d.ts +5 -1
- package/lib/exercises/math/powers/calculateNegativePower.d.ts.map +1 -1
- package/lib/exercises/math/powers/calculateNegativePower.js +93 -29
- package/lib/exercises/math/probaStat/basicProbas/index.d.ts +1 -0
- package/lib/exercises/math/probaStat/basicProbas/index.d.ts.map +1 -1
- package/lib/exercises/math/probaStat/basicProbas/index.js +1 -0
- package/lib/exercises/math/probaStat/basicProbas/possibleValuesForProba.d.ts +0 -1
- package/lib/exercises/math/probaStat/basicProbas/possibleValuesForProba.d.ts.map +1 -1
- package/lib/exercises/math/probaStat/basicProbas/possibleValuesForProba.js +42 -80
- package/lib/exercises/math/probaStat/conditionalProbaWriteFromFrench.d.ts +9 -0
- package/lib/exercises/math/probaStat/conditionalProbaWriteFromFrench.d.ts.map +1 -0
- package/lib/exercises/math/probaStat/conditionalProbaWriteFromFrench.js +217 -0
- package/lib/exercises/math/probaStat/index.d.ts +2 -0
- package/lib/exercises/math/probaStat/index.d.ts.map +1 -1
- package/lib/exercises/math/probaStat/index.js +2 -0
- package/lib/exercises/math/probaStat/probaAsSumOfProbas.d.ts +30 -0
- package/lib/exercises/math/probaStat/probaAsSumOfProbas.d.ts.map +1 -0
- package/lib/exercises/math/probaStat/probaAsSumOfProbas.js +548 -0
- package/lib/exercises/math/probaStat/probaFromTableNoContext.d.ts.map +1 -1
- package/lib/exercises/math/probaStat/probaFromTableNoContext.js +10 -2
- package/lib/exercises/math/probaStat/probaFromTableWithContext.d.ts.map +1 -1
- package/lib/exercises/math/probaStat/probaFromTableWithContext.js +2 -1
- package/lib/exercises/math/probaStat/stats1var/index.d.ts +2 -0
- package/lib/exercises/math/probaStat/stats1var/index.d.ts.map +1 -1
- package/lib/exercises/math/probaStat/stats1var/index.js +2 -0
- package/lib/exercises/math/probaStat/stats1var/interpretIndicatorsForLists.d.ts +9 -0
- package/lib/exercises/math/probaStat/stats1var/interpretIndicatorsForLists.d.ts.map +1 -0
- package/lib/exercises/math/probaStat/stats1var/interpretIndicatorsForLists.js +90 -0
- package/lib/exercises/math/probaStat/stats1var/plausibilityOfAverage.d.ts +10 -0
- package/lib/exercises/math/probaStat/stats1var/plausibilityOfAverage.d.ts.map +1 -0
- package/lib/exercises/math/probaStat/stats1var/plausibilityOfAverage.js +151 -0
- package/lib/exercises/math/probaStat/stats1var/quartilesList.d.ts +4 -1
- package/lib/exercises/math/probaStat/stats1var/quartilesList.d.ts.map +1 -1
- package/lib/exercises/math/probaStat/stats1var/quartilesList.js +46 -27
- package/lib/exercises/math/sequences/geometric/geometricFindExplicitFormula.d.ts.map +1 -1
- package/lib/exercises/math/sequences/geometric/geometricFindExplicitFormula.js +14 -2
- package/lib/exercises/math/sequences/geometric/geometricReasonUsage.d.ts +1 -0
- package/lib/exercises/math/sequences/geometric/geometricReasonUsage.d.ts.map +1 -1
- package/lib/exercises/math/sequences/geometric/geometricReasonUsage.js +43 -19
- package/lib/exercises/math/sequences/sequenceEvaluation.d.ts.map +1 -1
- package/lib/exercises/math/sequences/sequenceEvaluation.js +18 -1
- package/lib/exercises/pc/chemicalReactions/chemicalEquations.d.ts.map +1 -1
- package/lib/exercises/pc/chemicalReactions/chemicalEquations.js +17 -2
- package/lib/exercises/pc/electricity/calculateUEqualsRI.d.ts +7 -0
- package/lib/exercises/pc/electricity/calculateUEqualsRI.d.ts.map +1 -0
- package/lib/exercises/pc/electricity/calculateUEqualsRI.js +73 -0
- package/lib/exercises/pc/electricity/index.d.ts +1 -0
- package/lib/exercises/pc/electricity/index.d.ts.map +1 -1
- package/lib/exercises/pc/electricity/index.js +1 -0
- package/lib/exercises/pc/index.d.ts +1 -0
- package/lib/exercises/pc/index.d.ts.map +1 -1
- package/lib/exercises/pc/index.js +1 -0
- package/lib/exercises/pc/mole/molarMass.d.ts.map +1 -1
- package/lib/exercises/pc/mole/molarMass.js +7 -1
- package/lib/exercises/pc/moleculeFormula.d.ts.map +1 -1
- package/lib/exercises/pc/moleculeFormula.js +4 -3
- package/lib/exercises/pc/motion/averageSpeed.d.ts +9 -4
- package/lib/exercises/pc/motion/averageSpeed.d.ts.map +1 -1
- package/lib/exercises/pc/motion/averageSpeed.js +132 -61
- package/lib/exercises/pc/motion/averageSpeedCalculation.d.ts.map +1 -1
- package/lib/exercises/pc/motion/averageSpeedCalculation.js +10 -4
- package/lib/exercises/pc/optics/index.d.ts +2 -0
- package/lib/exercises/pc/optics/index.d.ts.map +1 -0
- package/lib/exercises/pc/optics/index.js +1 -0
- package/lib/exercises/pc/optics/lensFormula.d.ts +21 -0
- package/lib/exercises/pc/optics/lensFormula.d.ts.map +1 -0
- package/lib/exercises/pc/optics/lensFormula.js +415 -0
- package/lib/exercises/pc/recognizeRefractionOrReflectionAngles.d.ts +2 -2
- package/lib/exercises/pc/recognizeRefractionOrReflectionAngles.js +15 -15
- package/lib/exercises/pc/weight/calculateWeight.d.ts +8 -1
- package/lib/exercises/pc/weight/calculateWeight.d.ts.map +1 -1
- package/lib/exercises/pc/weight/calculateWeight.js +113 -38
- package/lib/exercises/utils/geogebra/toolBarConstructor.d.ts +1 -0
- package/lib/exercises/utils/geogebra/toolBarConstructor.d.ts.map +1 -1
- package/lib/exercises/utils/geogebra/toolBarConstructor.js +3 -1
- package/lib/geogebra/parsers/geogebraParser.d.ts +4 -0
- package/lib/geogebra/parsers/geogebraParser.d.ts.map +1 -1
- package/lib/geogebra/parsers/geogebraParser.js +17 -0
- package/lib/index.d.ts +392 -23
- package/lib/index.d.ts.map +1 -1
- package/lib/latexTester.d.ts.map +1 -1
- package/lib/latexTester.js +1 -0
- package/lib/math/geometry/CloudPoints.d.ts +10 -0
- package/lib/math/geometry/CloudPoints.d.ts.map +1 -1
- package/lib/math/geometry/CloudPoints.js +119 -0
- package/lib/math/geometry/line.d.ts +1 -0
- package/lib/math/geometry/line.d.ts.map +1 -1
- package/lib/math/geometry/line.js +10 -2
- package/lib/math/geometry/vector.d.ts +1 -0
- package/lib/math/geometry/vector.d.ts.map +1 -1
- package/lib/math/geometry/vector.js +12 -0
- package/lib/math/progCalc/progCalc.d.ts +46 -0
- package/lib/math/progCalc/progCalc.d.ts.map +1 -0
- package/lib/math/progCalc/progCalc.js +239 -0
- package/lib/math/utils/latex/realize.d.ts +12 -0
- package/lib/math/utils/latex/realize.d.ts.map +1 -0
- package/lib/math/utils/latex/realize.js +43 -0
- package/lib/pc/constants/molecularChemistry/molecule.d.ts +2 -0
- package/lib/pc/constants/molecularChemistry/molecule.d.ts.map +1 -1
- package/lib/pc/constants/molecularChemistry/molecule.js +52 -0
- package/lib/pc/units/timeUnits.d.ts +5 -3
- package/lib/pc/units/timeUnits.d.ts.map +1 -1
- package/lib/pc/units/timeUnits.js +25 -19
- package/lib/tests/questionTest.d.ts.map +1 -1
- package/lib/tests/questionTest.js +1 -1
- package/lib/tests/singleExo.test.js +3 -3
- package/lib/tree/nodes/algebraicNode.d.ts.map +1 -1
- package/lib/tree/nodes/operators/addNode.d.ts +4 -2
- package/lib/tree/nodes/operators/addNode.d.ts.map +1 -1
- package/lib/tree/nodes/operators/addNode.js +8 -17
- package/lib/tree/nodes/operators/fractionNode.d.ts +1 -1
- package/lib/tree/nodes/operators/fractionNode.d.ts.map +1 -1
- package/lib/tree/nodes/operators/fractionNode.js +5 -1
- package/lib/tree/nodes/operators/multiplyNode.d.ts +4 -2
- package/lib/tree/nodes/operators/multiplyNode.d.ts.map +1 -1
- package/lib/tree/nodes/operators/multiplyNode.js +8 -17
- package/lib/tree/nodes/operators/operatorNode.d.ts +3 -3
- package/lib/tree/nodes/operators/operatorNode.d.ts.map +1 -1
- package/lib/tree/nodes/variables/variableNode.d.ts +1 -1
- package/lib/tree/nodes/variables/variableNode.d.ts.map +1 -1
- package/lib/tree/utilities/nodeShuffler.d.ts +12 -0
- package/lib/tree/utilities/nodeShuffler.d.ts.map +1 -0
- package/lib/tree/utilities/nodeShuffler.js +123 -0
- package/lib/utils/arrays/getAllPicks.d.ts +2 -0
- package/lib/utils/arrays/getAllPicks.d.ts.map +1 -0
- package/lib/utils/arrays/getAllPicks.js +17 -0
- package/lib/utils/errors/handleVEAError.d.ts +1 -1
- package/lib/utils/errors/handleVEAError.d.ts.map +1 -1
- package/lib/utils/strings/decapitalize.d.ts +2 -0
- package/lib/utils/strings/decapitalize.d.ts.map +1 -0
- package/lib/utils/strings/decapitalize.js +3 -0
- package/package.json +1 -1
|
@@ -0,0 +1,402 @@
|
|
|
1
|
+
import { addValidProp, shuffleProps, tryToAddWrongProp, GeneratorOptionTarget, GeneratorOptionType, } from "../../../../exercises/exercise.js";
|
|
2
|
+
import { getDistinctQuestions } from "../../../../exercises/utils/getDistinctQuestions.js";
|
|
3
|
+
import { GeogebraConstructor } from "../../../../geogebra/geogebraConstructor.js";
|
|
4
|
+
import { Angle } from "../../../../math/geometry/angle.js";
|
|
5
|
+
import { Line, LineConstructor, } from "../../../../math/geometry/line.js";
|
|
6
|
+
import { Point, PointConstructor, } from "../../../../math/geometry/point.js";
|
|
7
|
+
import { Vector } from "../../../../math/geometry/vector.js";
|
|
8
|
+
import { randfloat } from "../../../../math/utils/random/randfloat.js";
|
|
9
|
+
import { round } from "../../../../math/utils/round.js";
|
|
10
|
+
import { PiNode } from "../../../../tree/nodes/numbers/piNode.js";
|
|
11
|
+
import { add } from "../../../../tree/nodes/operators/addNode.js";
|
|
12
|
+
import { multiply } from "../../../../tree/nodes/operators/multiplyNode.js";
|
|
13
|
+
import { substract } from "../../../../tree/nodes/operators/substractNode.js";
|
|
14
|
+
import { coinFlip } from "../../../../utils/alea/coinFlip.js";
|
|
15
|
+
import { random } from "../../../../utils/alea/random.js";
|
|
16
|
+
const createVector = (from, to, name, precision = 5) => {
|
|
17
|
+
return new Vector(name, round(substract(to.x, from.x).evaluate(), precision).toTree(), round(substract(to.y, from.y).evaluate(), precision).toTree());
|
|
18
|
+
};
|
|
19
|
+
const createPoint = (x, y, name, precision = 5) => {
|
|
20
|
+
return new Point(name, round(x, precision), round(y, precision));
|
|
21
|
+
};
|
|
22
|
+
const midPoint = (pointA, pointB, name, precision = 2) => {
|
|
23
|
+
return createPoint(multiply(add(pointA.x, pointB.x), 0.5).evaluate(), multiply(add(pointA.y, pointB.y), 0.5).evaluate(), name, precision);
|
|
24
|
+
};
|
|
25
|
+
const degreesToRadians = (angleInDegrees, precision) => {
|
|
26
|
+
const oneOver180 = 0.00555555555555555;
|
|
27
|
+
return round(multiply(multiply(angleInDegrees, PiNode), oneOver180).evaluate(), precision);
|
|
28
|
+
};
|
|
29
|
+
const rotatePoint = (target, angle, center, name, precision = 2) => {
|
|
30
|
+
const vSrc = createVector(center, target, "vSrc", precision);
|
|
31
|
+
const vRotated = vSrc.rotate(angle, "vRotated");
|
|
32
|
+
return createPoint(add(center.x, vRotated.x).evaluate(), add(center.y, vRotated.y).evaluate(), name, precision);
|
|
33
|
+
};
|
|
34
|
+
const buildLines = (cAngleInDegreesTop, cAngleInDegreesBottom) => {
|
|
35
|
+
//we build the quasiparallels using corresponding angles
|
|
36
|
+
/*
|
|
37
|
+
cAngleTop/
|
|
38
|
+
topLine------------------------
|
|
39
|
+
/
|
|
40
|
+
/
|
|
41
|
+
cAngleBottom/
|
|
42
|
+
bottomLine----------------------
|
|
43
|
+
/
|
|
44
|
+
*/
|
|
45
|
+
const precision = 5;
|
|
46
|
+
const [cAngleTop, cAngleBottom] = [
|
|
47
|
+
cAngleInDegreesTop,
|
|
48
|
+
cAngleInDegreesBottom,
|
|
49
|
+
].map((angleInDegrees) => degreesToRadians(angleInDegrees, precision));
|
|
50
|
+
//build top line
|
|
51
|
+
const heightAvgTopLine = 2;
|
|
52
|
+
const lineTop = new Line(new Point("A", (-4 + randfloat(-1, 1, 1)).toTree(), (heightAvgTopLine + randfloat(-1, 1, 1)).toTree()), new Point("B", (4 + randfloat(-1, 1, 1)).toTree(), (heightAvgTopLine + randfloat(-1, 1, 1)).toTree()), "d_1");
|
|
53
|
+
//build secant line
|
|
54
|
+
const pointSTop = midPoint(lineTop.pointA, lineTop.pointB, "C", 5);
|
|
55
|
+
const lineSecant = new Line(pointSTop, rotatePoint(lineTop.pointA, PiNode.value - cAngleTop, pointSTop, "D", 5), "s");
|
|
56
|
+
//build bottom line
|
|
57
|
+
const lineBottom = new Line(lineSecant.pointB, rotatePoint(lineSecant.pointA, cAngleBottom, lineSecant.pointB, "E", 5), "d_2");
|
|
58
|
+
return {
|
|
59
|
+
lineTop,
|
|
60
|
+
lineSecant,
|
|
61
|
+
lineBottom,
|
|
62
|
+
};
|
|
63
|
+
};
|
|
64
|
+
class IntersectionConstructor {
|
|
65
|
+
static fromBaselines(pointName, lineHBase, lineVBase) {
|
|
66
|
+
const center = lineHBase.intersect(lineVBase, pointName);
|
|
67
|
+
const lineH = Intersection.createLineBothSideOfPoint(lineHBase, center, lineVBase, "x");
|
|
68
|
+
const lineV = Intersection.createLineBothSideOfPoint(lineVBase, center, lineHBase, "y");
|
|
69
|
+
return new Intersection(center, lineH, lineV);
|
|
70
|
+
}
|
|
71
|
+
static fromIdentifiers(intersectionIds) {
|
|
72
|
+
const center = PointConstructor.fromIdentifiers(intersectionIds.center);
|
|
73
|
+
const lineH = LineConstructor.fromIdentifiers(intersectionIds.lineH);
|
|
74
|
+
const lineV = LineConstructor.fromIdentifiers(intersectionIds.lineV);
|
|
75
|
+
return new Intersection(center, lineH, lineV);
|
|
76
|
+
}
|
|
77
|
+
static byRotatingIntersection(intersectionSrc, rotationCenter, rotationAngle, precision = 5) {
|
|
78
|
+
const arrPointSrc = [
|
|
79
|
+
intersectionSrc.center,
|
|
80
|
+
intersectionSrc.lineH.pointA,
|
|
81
|
+
intersectionSrc.lineH.pointB,
|
|
82
|
+
intersectionSrc.lineV.pointA,
|
|
83
|
+
intersectionSrc.lineV.pointB,
|
|
84
|
+
];
|
|
85
|
+
const arrPointRotated = arrPointSrc.map((p) => {
|
|
86
|
+
return rotatePoint(p, rotationAngle, rotationCenter, p.name, precision);
|
|
87
|
+
});
|
|
88
|
+
return new Intersection(arrPointRotated[0], new Line(arrPointRotated[1], arrPointRotated[2], intersectionSrc.lineH.name), new Line(arrPointRotated[3], arrPointRotated[4], intersectionSrc.lineV.name));
|
|
89
|
+
}
|
|
90
|
+
}
|
|
91
|
+
class Intersection {
|
|
92
|
+
center;
|
|
93
|
+
lineH;
|
|
94
|
+
lineV;
|
|
95
|
+
constructor(center, lineH, lineV) {
|
|
96
|
+
this.center = center;
|
|
97
|
+
this.lineH = lineH;
|
|
98
|
+
this.lineV = lineV;
|
|
99
|
+
}
|
|
100
|
+
static createLineBothSideOfPoint(lineBase, pointCenter, lineIntersector, wrtAxis) {
|
|
101
|
+
switch (wrtAxis) {
|
|
102
|
+
case "x":
|
|
103
|
+
return new Line(lineBase.intersect(lineIntersector.translate(-1, 0), pointCenter.name + "_xm"), lineBase.intersect(lineIntersector.translate(+1, 0), pointCenter.name + "_xM"), lineBase.name);
|
|
104
|
+
case "y":
|
|
105
|
+
return new Line(lineBase.intersect(lineIntersector.translate(0, -1), pointCenter.name + "_ym"), lineBase.intersect(lineIntersector.translate(0, +1), pointCenter.name + "_yM"), lineBase.name);
|
|
106
|
+
}
|
|
107
|
+
}
|
|
108
|
+
getAngle(angleIndex) {
|
|
109
|
+
/*
|
|
110
|
+
lineV.pointB
|
|
111
|
+
0 | 1
|
|
112
|
+
lineH.pointA--center--lineH.pointB
|
|
113
|
+
3 | 2
|
|
114
|
+
lineV.pointA
|
|
115
|
+
*/
|
|
116
|
+
switch ((angleIndex % 4)) {
|
|
117
|
+
case 0:
|
|
118
|
+
return new Angle([this.lineH.pointA, this.center, this.lineV.pointB]);
|
|
119
|
+
case 1:
|
|
120
|
+
return new Angle([this.lineV.pointB, this.center, this.lineH.pointB]);
|
|
121
|
+
case 2:
|
|
122
|
+
return new Angle([this.lineH.pointB, this.center, this.lineV.pointA]);
|
|
123
|
+
case 3:
|
|
124
|
+
return new Angle([this.lineV.pointA, this.center, this.lineH.pointA]);
|
|
125
|
+
}
|
|
126
|
+
}
|
|
127
|
+
toIdentifiers() {
|
|
128
|
+
return {
|
|
129
|
+
center: this.center.toIdentifiers(),
|
|
130
|
+
lineH: this.lineH.toIdentifiers(),
|
|
131
|
+
lineV: this.lineV.toIdentifiers(),
|
|
132
|
+
};
|
|
133
|
+
}
|
|
134
|
+
}
|
|
135
|
+
const getPropositions = (n, { answer }) => {
|
|
136
|
+
const propositions = [];
|
|
137
|
+
addValidProp(propositions, answer, "raw");
|
|
138
|
+
tryToAddWrongProp(propositions, "Oui", "raw");
|
|
139
|
+
tryToAddWrongProp(propositions, "Non", "raw");
|
|
140
|
+
tryToAddWrongProp(propositions, "On ne peut pas savoir", "raw");
|
|
141
|
+
return shuffleProps(propositions, n);
|
|
142
|
+
};
|
|
143
|
+
const getAnswer = (identifiers) => {
|
|
144
|
+
return identifiers.isParralel ? "Oui" : "Non";
|
|
145
|
+
};
|
|
146
|
+
const getInstruction = () => {
|
|
147
|
+
return `Les droites $d_{1}$ et $d_{2}$ sont-elles parallèles ?`;
|
|
148
|
+
};
|
|
149
|
+
const getHint = () => {
|
|
150
|
+
return `Trouve la relation entre les deux angles et déduis-en, en fonction de leurs valeurs, si les droites sont parallèles ou non.`;
|
|
151
|
+
};
|
|
152
|
+
const getCorrection = (identifiers) => {
|
|
153
|
+
const { isParralel, angleType } = identifiers;
|
|
154
|
+
if (angleType !== "autres") {
|
|
155
|
+
return `Les deux angles sont ${(() => {
|
|
156
|
+
switch (angleType) {
|
|
157
|
+
case "alternes-internes":
|
|
158
|
+
return `alternes-internes`;
|
|
159
|
+
case "correspondants":
|
|
160
|
+
return `correspondants`;
|
|
161
|
+
break;
|
|
162
|
+
case "alternes-externes":
|
|
163
|
+
return `alternes-externes.`;
|
|
164
|
+
}
|
|
165
|
+
})()}.
|
|
166
|
+
${isParralel
|
|
167
|
+
? "Ils ont la même mesure donc les deux droites sont parallèles."
|
|
168
|
+
: "Ils n'ont pas la même mesure donc les deux droites ne sont pas parallèles."}
|
|
169
|
+
`;
|
|
170
|
+
}
|
|
171
|
+
else {
|
|
172
|
+
return `On calcule les mesures de deux angles correspondants à partir des angles donnés.
|
|
173
|
+
${isParralel
|
|
174
|
+
? "Ils ont la même mesure donc les deux droites sont parallèles."
|
|
175
|
+
: "Ils n'ont pas la même mesure donc les deux droites ne sont pas parallèles."}
|
|
176
|
+
`;
|
|
177
|
+
}
|
|
178
|
+
};
|
|
179
|
+
const getGGBOptions = (identifiers, opts) => {
|
|
180
|
+
const { arrIntersectionIds, arrAngleIndex, arrAngleForLabel } = identifiers;
|
|
181
|
+
const nbDigits = opts?.nbDigits ?? 1;
|
|
182
|
+
const arrIntersection = arrIntersectionIds.map(IntersectionConstructor.fromIdentifiers);
|
|
183
|
+
const arrAngle = arrAngleIndex.map((angleIndex, i) => arrIntersection[i].getAngle(angleIndex));
|
|
184
|
+
const arrCommandPoints = arrAngle
|
|
185
|
+
.flatMap((a) => a.points)
|
|
186
|
+
.flatMap((p) => [
|
|
187
|
+
...p.toGGBCommand({
|
|
188
|
+
isFixed: true,
|
|
189
|
+
showLabel: false,
|
|
190
|
+
showUnderlyingPoints: false,
|
|
191
|
+
showUnderlyingPointsLabel: false,
|
|
192
|
+
}),
|
|
193
|
+
//hide points
|
|
194
|
+
`SetVisibleInView(${p.name}, 1, false)`,
|
|
195
|
+
]);
|
|
196
|
+
const arrCommandLines = [
|
|
197
|
+
arrIntersectionIds[0].lineH, //top
|
|
198
|
+
arrIntersectionIds[1].lineH, //bottom
|
|
199
|
+
arrIntersectionIds[0].lineV, //secant
|
|
200
|
+
]
|
|
201
|
+
.map((lIds) => LineConstructor.fromIdentifiers(lIds))
|
|
202
|
+
.flatMap((l, i) => l.toGGBCommands(false, {
|
|
203
|
+
color: "black",
|
|
204
|
+
showLabel: i < 2,
|
|
205
|
+
}));
|
|
206
|
+
const arrCommandAngles = arrAngle
|
|
207
|
+
.map((angle, i) => {
|
|
208
|
+
angle.name = `angle_${i}`;
|
|
209
|
+
return angle;
|
|
210
|
+
})
|
|
211
|
+
.flatMap((a, i) => [
|
|
212
|
+
...a.toCommands({
|
|
213
|
+
pointsAreNotBuilt: false,
|
|
214
|
+
color: ["red", "blue"][i],
|
|
215
|
+
showValue: false,
|
|
216
|
+
}),
|
|
217
|
+
//fake or real label
|
|
218
|
+
`ShowLabel(${a.name}, false)`,
|
|
219
|
+
...a.getFitCaptionCommands({
|
|
220
|
+
text: round(arrAngleForLabel ? arrAngleForLabel[i] : a.evaluate(), nbDigits).frenchify(),
|
|
221
|
+
size: "small",
|
|
222
|
+
color: ["red", "blue"][i],
|
|
223
|
+
}),
|
|
224
|
+
]);
|
|
225
|
+
const ggb = new GeogebraConstructor({
|
|
226
|
+
commands: [...arrCommandPoints, ...arrCommandLines, ...arrCommandAngles],
|
|
227
|
+
hideAxes: true,
|
|
228
|
+
hideGrid: true,
|
|
229
|
+
forbidShiftDragZoom: true,
|
|
230
|
+
});
|
|
231
|
+
return ggb.getOptions({
|
|
232
|
+
coords: [-5, 5, -5, 5],
|
|
233
|
+
});
|
|
234
|
+
};
|
|
235
|
+
const getKeys = () => {
|
|
236
|
+
return [];
|
|
237
|
+
};
|
|
238
|
+
const isAnswerValid = (ans, { answer }) => {
|
|
239
|
+
return ans === answer;
|
|
240
|
+
};
|
|
241
|
+
const optsDefault = {
|
|
242
|
+
angleTypes: ["alternes-internes"],
|
|
243
|
+
isFakeDisplay: true,
|
|
244
|
+
nbDigits: 0,
|
|
245
|
+
};
|
|
246
|
+
const options = [
|
|
247
|
+
{
|
|
248
|
+
id: "angleTypes",
|
|
249
|
+
label: "Type d'angles",
|
|
250
|
+
target: GeneratorOptionTarget.generation,
|
|
251
|
+
type: GeneratorOptionType.multiselect,
|
|
252
|
+
values: [
|
|
253
|
+
"alternes-internes",
|
|
254
|
+
"correspondants",
|
|
255
|
+
"alternes-externes",
|
|
256
|
+
"autres",
|
|
257
|
+
],
|
|
258
|
+
defaultValue: optsDefault.angleTypes,
|
|
259
|
+
},
|
|
260
|
+
{
|
|
261
|
+
id: "isFakeDisplay",
|
|
262
|
+
label: "Affichage trompeur",
|
|
263
|
+
target: GeneratorOptionTarget.generation,
|
|
264
|
+
type: GeneratorOptionType.checkbox,
|
|
265
|
+
defaultValue: optsDefault.isFakeDisplay,
|
|
266
|
+
},
|
|
267
|
+
{
|
|
268
|
+
id: "nbDigits",
|
|
269
|
+
label: "Nombre de décimales",
|
|
270
|
+
target: GeneratorOptionTarget.generation,
|
|
271
|
+
type: GeneratorOptionType.select,
|
|
272
|
+
values: [0, 1, 2],
|
|
273
|
+
defaultValue: optsDefault.nbDigits,
|
|
274
|
+
},
|
|
275
|
+
];
|
|
276
|
+
const getIsParallelUsingAnglesQuestion = (optsIn) => {
|
|
277
|
+
const isParralel = coinFlip();
|
|
278
|
+
const opts = optsIn ?? optsDefault;
|
|
279
|
+
//---create intersections---
|
|
280
|
+
//this config will be used to create ggb lines
|
|
281
|
+
function createConfigGeom(isParralelInGeom, isLookingParallel) {
|
|
282
|
+
const deviation = isLookingParallel ? 1 : 5;
|
|
283
|
+
const cAngleInDegreesMin = 30;
|
|
284
|
+
const cAngleInDegreesTop = randfloat(cAngleInDegreesMin, 180 - cAngleInDegreesMin, opts.nbDigits);
|
|
285
|
+
const cAngleInDegreesBottom = isParralelInGeom
|
|
286
|
+
? cAngleInDegreesTop
|
|
287
|
+
: cAngleInDegreesTop +
|
|
288
|
+
randfloat(-deviation, deviation, opts.nbDigits, [0]);
|
|
289
|
+
return {
|
|
290
|
+
cAngleInDegreesTop,
|
|
291
|
+
cAngleInDegreesBottom,
|
|
292
|
+
};
|
|
293
|
+
}
|
|
294
|
+
const configGeom = createConfigGeom(opts.isFakeDisplay ? coinFlip() : isParralel, opts.isFakeDisplay ? coinFlip() : isParralel);
|
|
295
|
+
const dictLine = buildLines(configGeom.cAngleInDegreesTop, configGeom.cAngleInDegreesBottom);
|
|
296
|
+
const arrIntersectionRaw = [
|
|
297
|
+
//intersection: top
|
|
298
|
+
IntersectionConstructor.fromBaselines("I", dictLine.lineTop, dictLine.lineSecant),
|
|
299
|
+
//intersection: bottom
|
|
300
|
+
IntersectionConstructor.fromBaselines("J", dictLine.lineBottom, dictLine.lineSecant),
|
|
301
|
+
];
|
|
302
|
+
//rotate randomly around center
|
|
303
|
+
const rotationCenter = midPoint(arrIntersectionRaw[0].center, arrIntersectionRaw[1].center, "K", 5);
|
|
304
|
+
const rotationAngle = randfloat(-PiNode.value, PiNode.value);
|
|
305
|
+
const arrIntersection = arrIntersectionRaw.map((intersection) => IntersectionConstructor.byRotatingIntersection(intersection, rotationCenter, rotationAngle));
|
|
306
|
+
//---create angles---
|
|
307
|
+
const angleType = random(opts.angleTypes);
|
|
308
|
+
function randomArrAngleIndex(angleType) {
|
|
309
|
+
/*
|
|
310
|
+
0 | 1
|
|
311
|
+
-----
|
|
312
|
+
3 | 2
|
|
313
|
+
|
|
|
314
|
+
0 | 1
|
|
315
|
+
-----
|
|
316
|
+
3 | 2
|
|
317
|
+
*/
|
|
318
|
+
switch (angleType) {
|
|
319
|
+
case "alternes-internes":
|
|
320
|
+
return random([
|
|
321
|
+
[2, 0],
|
|
322
|
+
[3, 1],
|
|
323
|
+
]);
|
|
324
|
+
case "correspondants":
|
|
325
|
+
return random([
|
|
326
|
+
[0, 0],
|
|
327
|
+
[1, 1],
|
|
328
|
+
[2, 2],
|
|
329
|
+
[3, 3],
|
|
330
|
+
]);
|
|
331
|
+
case "alternes-externes":
|
|
332
|
+
return random([
|
|
333
|
+
[0, 2],
|
|
334
|
+
[1, 3],
|
|
335
|
+
]);
|
|
336
|
+
case "autres":
|
|
337
|
+
return random([
|
|
338
|
+
[0, 1],
|
|
339
|
+
[0, 3],
|
|
340
|
+
[1, 2],
|
|
341
|
+
[1, 0],
|
|
342
|
+
[2, 1],
|
|
343
|
+
[2, 3],
|
|
344
|
+
[3, 0],
|
|
345
|
+
[3, 2],
|
|
346
|
+
]);
|
|
347
|
+
}
|
|
348
|
+
}
|
|
349
|
+
const arrAngleIndex = randomArrAngleIndex(angleType);
|
|
350
|
+
//this is the fake display part:
|
|
351
|
+
let arrAngleForLabel;
|
|
352
|
+
if (opts.isFakeDisplay) {
|
|
353
|
+
const angleInDegreesMin = 25;
|
|
354
|
+
const cAngleInDegreesTop = randfloat(angleInDegreesMin, 180 - angleInDegreesMin, opts.nbDigits);
|
|
355
|
+
const cAngleInDegreesBottom = isParralel
|
|
356
|
+
? cAngleInDegreesTop
|
|
357
|
+
: cAngleInDegreesTop + randfloat(-25, 50, opts.nbDigits, [0]);
|
|
358
|
+
//angles at angleIndexes 0 and 2 have same value. Same for angleIndexes 1 and 3.
|
|
359
|
+
arrAngleForLabel = [cAngleInDegreesTop, cAngleInDegreesBottom].map((angle, i) => {
|
|
360
|
+
return arrAngleIndex[i] % 2 == 0 ? angle : 180 - angle;
|
|
361
|
+
});
|
|
362
|
+
}
|
|
363
|
+
const identifiers = {
|
|
364
|
+
isParralel,
|
|
365
|
+
arrIntersectionIds: arrIntersection.map((intersection) => intersection.toIdentifiers()),
|
|
366
|
+
angleType,
|
|
367
|
+
arrAngleIndex,
|
|
368
|
+
arrAngleForLabel,
|
|
369
|
+
};
|
|
370
|
+
return getQuestionFromIdentifiers(identifiers, opts);
|
|
371
|
+
};
|
|
372
|
+
const getQuestionFromIdentifiers = (identifiers, opts) => {
|
|
373
|
+
const question = {
|
|
374
|
+
answer: getAnswer(identifiers),
|
|
375
|
+
instruction: getInstruction(identifiers),
|
|
376
|
+
keys: getKeys(identifiers),
|
|
377
|
+
answerFormat: "tex",
|
|
378
|
+
identifiers,
|
|
379
|
+
hint: getHint(identifiers),
|
|
380
|
+
correction: getCorrection(identifiers),
|
|
381
|
+
ggbOptions: getGGBOptions(identifiers, opts),
|
|
382
|
+
};
|
|
383
|
+
return question;
|
|
384
|
+
};
|
|
385
|
+
export const isParallelUsingAngles = {
|
|
386
|
+
id: "isParallelUsingAngles",
|
|
387
|
+
label: "Déterminer si deux droites sont parallèles en utilisant des angles issus d'une sécante",
|
|
388
|
+
isSingleStep: true,
|
|
389
|
+
generator: (nb, opts) => getDistinctQuestions(() => getIsParallelUsingAnglesQuestion(opts), nb),
|
|
390
|
+
options,
|
|
391
|
+
qcmTimer: 60,
|
|
392
|
+
freeTimer: 60,
|
|
393
|
+
getPropositions,
|
|
394
|
+
isAnswerValid,
|
|
395
|
+
subject: "Mathématiques",
|
|
396
|
+
getHint,
|
|
397
|
+
getCorrection,
|
|
398
|
+
hasHintAndCorrection: true,
|
|
399
|
+
answerType: "QCU",
|
|
400
|
+
getQuestionFromIdentifiers,
|
|
401
|
+
hasGeogebra: true,
|
|
402
|
+
};
|
|
@@ -1,13 +1,16 @@
|
|
|
1
1
|
import { Exercise } from "../../../../exercises/exercise.js";
|
|
2
2
|
import { NumberType } from "../../../../math/numbers/nombre.js";
|
|
3
|
+
import { NodeIdentifiers } from "../../../../tree/nodes/nodeConstructor.js";
|
|
3
4
|
type Identifiers = {
|
|
4
5
|
abscissType: NumberType;
|
|
5
|
-
axisUnit:
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
abscissTex: string;
|
|
9
|
-
coeff: number;
|
|
6
|
+
axisUnit: NodeIdentifiers;
|
|
7
|
+
absciss1: NodeIdentifiers;
|
|
8
|
+
absciss2: NodeIdentifiers;
|
|
10
9
|
};
|
|
11
|
-
|
|
10
|
+
type Options = {
|
|
11
|
+
questionType: "standard" | "éviter le comptage";
|
|
12
|
+
numberType: "Entiers" | "Rationnels" | "Décimaux";
|
|
13
|
+
};
|
|
14
|
+
export declare const placeAbscissOnSemiLine: Exercise<Identifiers, Options>;
|
|
12
15
|
export {};
|
|
13
16
|
//# sourceMappingURL=placeAbscissOnSemiLine.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"placeAbscissOnSemiLine.d.ts","sourceRoot":"","sources":["../../../../../src/exercises/math/geometry/cartesian/placeAbscissOnSemiLine.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,QAAQ,
|
|
1
|
+
{"version":3,"file":"placeAbscissOnSemiLine.d.ts","sourceRoot":"","sources":["../../../../../src/exercises/math/geometry/cartesian/placeAbscissOnSemiLine.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,QAAQ,EAWT,MAAM,6BAA6B,CAAC;AAQrC,OAAO,EAAE,UAAU,EAAE,MAAM,8BAA8B,CAAC;AAK1D,OAAO,EAEL,eAAe,EAChB,MAAM,qCAAqC,CAAC;AAK7C,KAAK,WAAW,GAAG;IACjB,WAAW,EAAE,UAAU,CAAC;IACxB,QAAQ,EAAE,eAAe,CAAC;IAC1B,QAAQ,EAAE,eAAe,CAAC;IAC1B,QAAQ,EAAE,eAAe,CAAC;CAC3B,CAAC;AAkOF,KAAK,OAAO,GAAG;IACb,YAAY,EAAE,UAAU,GAAG,oBAAoB,CAAC;IAChD,UAAU,EAAE,SAAS,GAAG,YAAY,GAAG,UAAU,CAAC;CACnD,CAAC;AA6BF,eAAO,MAAM,sBAAsB,EAAE,QAAQ,CAAC,WAAW,EAAE,OAAO,CAYjE,CAAC"}
|