math-exercises 3.0.125 → 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/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/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 +5 -6
- 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/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/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/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/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/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/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/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/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/moleculeFormula.d.ts.map +1 -1
- package/lib/exercises/pc/moleculeFormula.js +4 -3
- 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/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/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 +346 -12
- 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/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,107 @@
|
|
|
1
|
+
import { addValidProp, shuffleProps, tryToAddWrongProp, } from "../../../../exercises/exercise.js";
|
|
2
|
+
import { getDistinctQuestions } from "../../../../exercises/utils/getDistinctQuestions.js";
|
|
3
|
+
import { randomMany } from "../../../../utils/alea/random.js";
|
|
4
|
+
const getInstruction = (identifiers) => {
|
|
5
|
+
const { varNames } = identifiers;
|
|
6
|
+
const [x, y, u] = varNames;
|
|
7
|
+
return `On considère $${x}$, $${y}$ et $${u}$ trois nombres non nuls tels que
|
|
8
|
+
|
|
9
|
+
$$
|
|
10
|
+
\\frac{1}{${x}}+\\frac{1}{${y}}=\\frac{1}{${u}}
|
|
11
|
+
$$
|
|
12
|
+
|
|
13
|
+
Alors $${u}$ = ?`;
|
|
14
|
+
};
|
|
15
|
+
const getHint = (identifiers) => {
|
|
16
|
+
const { varNames } = identifiers;
|
|
17
|
+
const [, , u] = varNames;
|
|
18
|
+
return `Pour isoler $${u}$, il faut passer à l'inverse.`;
|
|
19
|
+
};
|
|
20
|
+
const getCorrection = (identifiers) => {
|
|
21
|
+
const { varNames } = identifiers;
|
|
22
|
+
const [x, y, u] = varNames;
|
|
23
|
+
return `L'inverse de $\\frac{1}{${u}}$ est $${u}$.
|
|
24
|
+
|
|
25
|
+
L'inverse de $\\frac{1}{${x}}+\\frac{1}{${y}}$ est $\\frac{1}{\\frac{1}{${x}}+\\frac{1}{${y}}}$.
|
|
26
|
+
|
|
27
|
+
Il faut donc mettre ces deux fractions au même dénominateur.
|
|
28
|
+
|
|
29
|
+
On obtient :
|
|
30
|
+
|
|
31
|
+
$$
|
|
32
|
+
\\frac{1}{\\frac{1}{${x}}+\\frac{1}{${y}}}
|
|
33
|
+
$$
|
|
34
|
+
|
|
35
|
+
$$
|
|
36
|
+
= \\frac{1}{\\frac{${x}+${y}}{${x}${y}}}
|
|
37
|
+
$$
|
|
38
|
+
|
|
39
|
+
$$
|
|
40
|
+
= \\frac{${x}${y}}{${x}+${y}}
|
|
41
|
+
$$
|
|
42
|
+
|
|
43
|
+
Conclusion :
|
|
44
|
+
|
|
45
|
+
$$
|
|
46
|
+
\\frac{1}{${u}} = \\frac{${x}${y}}{${x}+${y}}
|
|
47
|
+
$$
|
|
48
|
+
|
|
49
|
+
`;
|
|
50
|
+
};
|
|
51
|
+
const getPropositions = (nbProps, { answer, ...identifiers }) => {
|
|
52
|
+
const { varNames } = identifiers;
|
|
53
|
+
const [x, y] = varNames;
|
|
54
|
+
const propositions = [];
|
|
55
|
+
addValidProp(propositions, `\\frac{${x}${y}}{${x}+${y}}`, "tex");
|
|
56
|
+
tryToAddWrongProp(propositions, `\\frac{${x}+${y}}{${x}${y}}`, "tex");
|
|
57
|
+
tryToAddWrongProp(propositions, `${x}${y}`, "tex");
|
|
58
|
+
tryToAddWrongProp(propositions, `${x} + ${y}`, "tex");
|
|
59
|
+
return shuffleProps(propositions, nbProps);
|
|
60
|
+
};
|
|
61
|
+
const getIsolateUInInvXPlusInvYEqualsInvUQuestion = () => {
|
|
62
|
+
const varNames = randomMany(["x", "y", "z", "t", "u", "v", "w"], 3);
|
|
63
|
+
return getQuestionFromIdentifiers({ varNames });
|
|
64
|
+
};
|
|
65
|
+
const getQuestionFromIdentifiers = (identifiers) => {
|
|
66
|
+
const question = {
|
|
67
|
+
instruction: getInstruction(identifiers),
|
|
68
|
+
keys: [],
|
|
69
|
+
answerFormat: "tex",
|
|
70
|
+
identifiers,
|
|
71
|
+
hint: getHint(identifiers),
|
|
72
|
+
correction: getCorrection(identifiers),
|
|
73
|
+
};
|
|
74
|
+
return question;
|
|
75
|
+
};
|
|
76
|
+
export const isolateUInInvXPlusInvYEqualsInvU = {
|
|
77
|
+
id: "isolateUInInvXPlusInvYEqualsInvU",
|
|
78
|
+
label: "Isoler $u$ dans l'expression $\\frac{1}{x}+\\frac{1}{y}=\\frac{1}{u}$",
|
|
79
|
+
isSingleStep: true,
|
|
80
|
+
generator: (nb) => getDistinctQuestions(() => getIsolateUInInvXPlusInvYEqualsInvUQuestion(), nb, 30),
|
|
81
|
+
qcmTimer: 60,
|
|
82
|
+
freeTimer: 60,
|
|
83
|
+
getPropositions,
|
|
84
|
+
subject: "Mathématiques",
|
|
85
|
+
maxAllowedQuestions: 30,
|
|
86
|
+
getQuestionFromIdentifiers,
|
|
87
|
+
answerType: "QCU",
|
|
88
|
+
hasHintAndCorrection: true,
|
|
89
|
+
};
|
|
90
|
+
const getIsolateRInInvR1PlusInvR2EqualsInvRQuestion = () => {
|
|
91
|
+
const varNames = ["R_1", "R_2", "R"];
|
|
92
|
+
return getQuestionFromIdentifiers({ varNames });
|
|
93
|
+
};
|
|
94
|
+
export const isolateRInInvR1PlusInvR2EqualsInvR = {
|
|
95
|
+
id: "isolateRInInvR1PlusInvR2EqualsInvR",
|
|
96
|
+
label: "Isoler $R$ dans l'expression $\\frac{1}{R_1}+\\frac{1}{R_2}=\\frac{1}{R}$",
|
|
97
|
+
isSingleStep: true,
|
|
98
|
+
generator: (nb) => getDistinctQuestions(() => getIsolateRInInvR1PlusInvR2EqualsInvRQuestion(), nb, 30, () => false),
|
|
99
|
+
qcmTimer: 60,
|
|
100
|
+
freeTimer: 60,
|
|
101
|
+
getPropositions,
|
|
102
|
+
subject: "Mathématiques",
|
|
103
|
+
maxAllowedQuestions: 30,
|
|
104
|
+
getQuestionFromIdentifiers,
|
|
105
|
+
answerType: "QCU",
|
|
106
|
+
hasHintAndCorrection: true,
|
|
107
|
+
};
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
import { Exercise } from "../../../../exercises/exercise.js";
|
|
2
|
+
type Identifiers = {
|
|
3
|
+
varNames: string[];
|
|
4
|
+
};
|
|
5
|
+
export declare const isolateXInInvXPlusInvYEqualsInvU: Exercise<Identifiers>;
|
|
6
|
+
export {};
|
|
7
|
+
//# sourceMappingURL=isolateXInInvXPlusInvYEqualsInvU.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"isolateXInInvXPlusInvYEqualsInvU.d.ts","sourceRoot":"","sources":["../../../../../src/exercises/math/calculLitteral/isolate/isolateXInInvXPlusInvYEqualsInvU.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,QAAQ,EAYT,MAAM,6BAA6B,CAAC;AAIrC,KAAK,WAAW,GAAG;IACjB,QAAQ,EAAE,MAAM,EAAE,CAAC;CACpB,CAAC;AAkFF,eAAO,MAAM,gCAAgC,EAAE,QAAQ,CAAC,WAAW,CAmBlE,CAAC"}
|
|
@@ -0,0 +1,80 @@
|
|
|
1
|
+
import { addValidProp, shuffleProps, tryToAddWrongProp, } from "../../../../exercises/exercise.js";
|
|
2
|
+
import { getDistinctQuestions } from "../../../../exercises/utils/getDistinctQuestions.js";
|
|
3
|
+
import { randomMany } from "../../../../utils/alea/random.js";
|
|
4
|
+
const getInstruction = (identifiers) => {
|
|
5
|
+
const { varNames } = identifiers;
|
|
6
|
+
const [x, y, u] = varNames;
|
|
7
|
+
return `On considère $${x}$, $${y}$ et $${u}$ trois nombres non nuls tels que
|
|
8
|
+
|
|
9
|
+
$$
|
|
10
|
+
\\frac{1}{${x}}+\\frac{1}{${y}}=\\frac{1}{${u}}
|
|
11
|
+
$$
|
|
12
|
+
|
|
13
|
+
Alors $${x}$ = ?`;
|
|
14
|
+
};
|
|
15
|
+
const getHint = (identifiers) => {
|
|
16
|
+
const { varNames } = identifiers;
|
|
17
|
+
const [x, ,] = varNames;
|
|
18
|
+
return `Il faut isoler $\\frac{1}{${x}}$ puis passer à l'inverse.`;
|
|
19
|
+
};
|
|
20
|
+
const getCorrection = (identifiers) => {
|
|
21
|
+
const { varNames } = identifiers;
|
|
22
|
+
const [x, y, u] = varNames;
|
|
23
|
+
return `On a :
|
|
24
|
+
|
|
25
|
+
$$
|
|
26
|
+
\\frac{1}{${x}}=\\frac{1}{${u}}-\\frac{1}{${y}}
|
|
27
|
+
$$
|
|
28
|
+
|
|
29
|
+
$$
|
|
30
|
+
\\frac{1}{${x}}=\\frac{${y}-${u}}{${u}${y}}
|
|
31
|
+
$$
|
|
32
|
+
|
|
33
|
+
Ainsi
|
|
34
|
+
|
|
35
|
+
$$
|
|
36
|
+
${x}=\\frac{${u}${y}}{${y}-${u}}
|
|
37
|
+
$$
|
|
38
|
+
|
|
39
|
+
`;
|
|
40
|
+
};
|
|
41
|
+
const getPropositions = (nbProps, { answer, ...identifiers }) => {
|
|
42
|
+
const { varNames } = identifiers;
|
|
43
|
+
const [, y, u] = varNames;
|
|
44
|
+
const propositions = [];
|
|
45
|
+
addValidProp(propositions, `\\frac{${u}${y}}{${y}-${u}}`, "tex");
|
|
46
|
+
tryToAddWrongProp(propositions, `\\frac{${y}-${u}}{${u}${y}}`, "tex");
|
|
47
|
+
tryToAddWrongProp(propositions, `${u}-${y}`, "tex");
|
|
48
|
+
tryToAddWrongProp(propositions, `\\frac{${u}${y}}{${y}+${u}}`, "tex");
|
|
49
|
+
tryToAddWrongProp(propositions, `\\frac{${y}+${u}}{${u}${y}}`, "tex");
|
|
50
|
+
return shuffleProps(propositions, nbProps);
|
|
51
|
+
};
|
|
52
|
+
const getIsolateXInInvXPlusInvYEqualsInvUQuestion = () => {
|
|
53
|
+
const varNames = randomMany(["x", "y", "z", "t", "u", "v", "w"], 3);
|
|
54
|
+
return getQuestionFromIdentifiers({ varNames });
|
|
55
|
+
};
|
|
56
|
+
const getQuestionFromIdentifiers = (identifiers) => {
|
|
57
|
+
const question = {
|
|
58
|
+
instruction: getInstruction(identifiers),
|
|
59
|
+
keys: [],
|
|
60
|
+
answerFormat: "tex",
|
|
61
|
+
identifiers,
|
|
62
|
+
hint: getHint(identifiers),
|
|
63
|
+
correction: getCorrection(identifiers),
|
|
64
|
+
};
|
|
65
|
+
return question;
|
|
66
|
+
};
|
|
67
|
+
export const isolateXInInvXPlusInvYEqualsInvU = {
|
|
68
|
+
id: "isolateXInInvXPlusInvYEqualsInvU",
|
|
69
|
+
label: "Isoler $x$ dans l'expression $\\frac{1}{x}+\\frac{1}{y}=\\frac{1}{u}$",
|
|
70
|
+
isSingleStep: true,
|
|
71
|
+
generator: (nb) => getDistinctQuestions(() => getIsolateXInInvXPlusInvYEqualsInvUQuestion(), nb, 30),
|
|
72
|
+
qcmTimer: 60,
|
|
73
|
+
freeTimer: 60,
|
|
74
|
+
getPropositions,
|
|
75
|
+
subject: "Mathématiques",
|
|
76
|
+
maxAllowedQuestions: 30,
|
|
77
|
+
getQuestionFromIdentifiers,
|
|
78
|
+
answerType: "QCU",
|
|
79
|
+
hasHintAndCorrection: true,
|
|
80
|
+
};
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
import { Exercise } from "../../../../exercises/exercise.js";
|
|
2
|
+
type Identifiers = {
|
|
3
|
+
names: string[];
|
|
4
|
+
texInstruction: string;
|
|
5
|
+
texsCorrection: string[];
|
|
6
|
+
texsAnswer: string[];
|
|
7
|
+
};
|
|
8
|
+
export declare const compareAMinusB: Exercise<Identifiers>;
|
|
9
|
+
export {};
|
|
10
|
+
//# sourceMappingURL=compareAMinusB.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"compareAMinusB.d.ts","sourceRoot":"","sources":["../../../../../src/exercises/math/calculLitteral/ordering/compareAMinusB.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,QAAQ,EAaT,MAAM,6BAA6B,CAAC;AAMrC,KAAK,WAAW,GAAG;IACjB,KAAK,EAAE,MAAM,EAAE,CAAC;IAChB,cAAc,EAAE,MAAM,CAAC;IACvB,cAAc,EAAE,MAAM,EAAE,CAAC;IACzB,UAAU,EAAE,MAAM,EAAE,CAAC;CACtB,CAAC;AAkMF,eAAO,MAAM,cAAc,EAAE,QAAQ,CAAC,WAAW,CAgBhD,CAAC"}
|
|
@@ -0,0 +1,182 @@
|
|
|
1
|
+
import { addValidProp, shuffleProps, tryToAddWrongProp, } from "../../../../exercises/exercise.js";
|
|
2
|
+
import { getDistinctQuestions } from "../../../../exercises/utils/getDistinctQuestions.js";
|
|
3
|
+
import { coinFlip } from "../../../../utils/alea/coinFlip.js";
|
|
4
|
+
import { random, randomMany } from "../../../../utils/alea/random.js";
|
|
5
|
+
const getInstruction = (identifiers) => {
|
|
6
|
+
const { names, texInstruction } = identifiers;
|
|
7
|
+
return `Si $${names[0]}$ et $${names[1]}$ sont deux nombres tels que
|
|
8
|
+
|
|
9
|
+
$$
|
|
10
|
+
${texInstruction}
|
|
11
|
+
$$
|
|
12
|
+
|
|
13
|
+
alors on peut dire que :`;
|
|
14
|
+
};
|
|
15
|
+
const getHint = (identifiers) => {
|
|
16
|
+
const { names } = identifiers;
|
|
17
|
+
return `Il s'agit de comparer $${names[0]}$ et $${names[1]}$.`;
|
|
18
|
+
};
|
|
19
|
+
const getCorrection = (identifiers) => {
|
|
20
|
+
const { names, texInstruction, texsCorrection } = identifiers;
|
|
21
|
+
return `On a :
|
|
22
|
+
|
|
23
|
+
$$
|
|
24
|
+
${texInstruction}
|
|
25
|
+
$$
|
|
26
|
+
|
|
27
|
+
En ajoutant $${names[1]}$ de chaque côté, on obtient :
|
|
28
|
+
|
|
29
|
+
$$
|
|
30
|
+
${texsCorrection[0]}
|
|
31
|
+
$$
|
|
32
|
+
|
|
33
|
+
${texsCorrection.length > 1
|
|
34
|
+
? `On peut aussi en déduire l'inégalité moins stricte :
|
|
35
|
+
|
|
36
|
+
$$
|
|
37
|
+
${texsCorrection[1]}
|
|
38
|
+
$$
|
|
39
|
+
|
|
40
|
+
`
|
|
41
|
+
: ``}
|
|
42
|
+
|
|
43
|
+
`;
|
|
44
|
+
};
|
|
45
|
+
const getPropositions = (n, { names, texsAnswer }) => {
|
|
46
|
+
const propositions = [];
|
|
47
|
+
texsAnswer.forEach((tex) => {
|
|
48
|
+
addValidProp(propositions, tex);
|
|
49
|
+
});
|
|
50
|
+
const invalidProps = [
|
|
51
|
+
`${names[0]} < ${names[1]}`,
|
|
52
|
+
`${names[0]} > ${names[1]}`,
|
|
53
|
+
`${names[0]} \\leq ${names[1]}`,
|
|
54
|
+
`${names[0]} \\geq ${names[1]}`,
|
|
55
|
+
`${names[1]} < ${names[0]}`,
|
|
56
|
+
`${names[1]} > ${names[0]}`,
|
|
57
|
+
`${names[1]} \\leq ${names[0]}`,
|
|
58
|
+
`${names[1]} \\geq ${names[0]}`,
|
|
59
|
+
].filter((tex) => !texsAnswer.includes(tex));
|
|
60
|
+
invalidProps.forEach((tex) => {
|
|
61
|
+
tryToAddWrongProp(propositions, tex);
|
|
62
|
+
});
|
|
63
|
+
return shuffleProps(propositions, n);
|
|
64
|
+
};
|
|
65
|
+
const isAnswerValid = (ans, { texsAnswer }) => {
|
|
66
|
+
return texsAnswer.includes(ans);
|
|
67
|
+
};
|
|
68
|
+
const getCompareAMinusBQuestion = () => {
|
|
69
|
+
const namesPool = ["a", "b", "c", "d", "r", "s", "t", "u", "v"];
|
|
70
|
+
let names = randomMany(namesPool, 2);
|
|
71
|
+
const compareSymbol = random(["inf", "sup", "leq", "geq"]);
|
|
72
|
+
let texsObjectArray = [];
|
|
73
|
+
switch (compareSymbol) {
|
|
74
|
+
case "inf":
|
|
75
|
+
{
|
|
76
|
+
texsObjectArray = [
|
|
77
|
+
{
|
|
78
|
+
texInstruction: `x - y < 0`,
|
|
79
|
+
texsCorrection: [`x < y`, `x \\leq y`],
|
|
80
|
+
texsAnswer: [`x < y`, `x \\leq y`, `y > x`, `y \\geq x`],
|
|
81
|
+
},
|
|
82
|
+
{
|
|
83
|
+
texInstruction: `0 > x - y`,
|
|
84
|
+
texsCorrection: [`y > x`, `y \\geq x`],
|
|
85
|
+
texsAnswer: [`x < y`, `x \\leq y`, `y > x`, `y \\geq x`],
|
|
86
|
+
},
|
|
87
|
+
];
|
|
88
|
+
}
|
|
89
|
+
break;
|
|
90
|
+
case "sup":
|
|
91
|
+
{
|
|
92
|
+
texsObjectArray = [
|
|
93
|
+
{
|
|
94
|
+
texInstruction: `x - y > 0`,
|
|
95
|
+
texsCorrection: [`x > y`, `x \\geq y`],
|
|
96
|
+
texsAnswer: [`x > y`, `x \\geq y`, `y < x`, `y \\leq x`],
|
|
97
|
+
},
|
|
98
|
+
{
|
|
99
|
+
texInstruction: `0 < x - y`,
|
|
100
|
+
texsCorrection: [`y < x`, `y \\leq x`],
|
|
101
|
+
texsAnswer: [`x > y`, `x \\geq y`, `y < x`, `y \\leq x`],
|
|
102
|
+
},
|
|
103
|
+
];
|
|
104
|
+
}
|
|
105
|
+
break;
|
|
106
|
+
case "leq":
|
|
107
|
+
{
|
|
108
|
+
texsObjectArray = [
|
|
109
|
+
{
|
|
110
|
+
texInstruction: `x - y \\leq 0`,
|
|
111
|
+
texsCorrection: [`x \\leq y`],
|
|
112
|
+
texsAnswer: [`x \\leq y`, `y \\geq x`],
|
|
113
|
+
},
|
|
114
|
+
{
|
|
115
|
+
texInstruction: `0 \\geq x - y`,
|
|
116
|
+
texsCorrection: [`y \\geq x`],
|
|
117
|
+
texsAnswer: [`x \\leq y`, `y \\geq x`],
|
|
118
|
+
},
|
|
119
|
+
];
|
|
120
|
+
}
|
|
121
|
+
break;
|
|
122
|
+
case "geq":
|
|
123
|
+
{
|
|
124
|
+
texsObjectArray = [
|
|
125
|
+
{
|
|
126
|
+
texInstruction: `x - y \\geq 0`,
|
|
127
|
+
texsCorrection: [`x \\geq y`],
|
|
128
|
+
texsAnswer: [`x \\geq y`, `y \\leq x`],
|
|
129
|
+
},
|
|
130
|
+
{
|
|
131
|
+
texInstruction: `0 \\leq x - y`,
|
|
132
|
+
texsCorrection: [`y \\leq x`],
|
|
133
|
+
texsAnswer: [`x \\geq y`, `y \\leq x`],
|
|
134
|
+
},
|
|
135
|
+
];
|
|
136
|
+
}
|
|
137
|
+
break;
|
|
138
|
+
}
|
|
139
|
+
function replaceVarNames(tex) {
|
|
140
|
+
return tex.replaceAll("x", names[0]).replaceAll("y", names[1]);
|
|
141
|
+
}
|
|
142
|
+
const order = coinFlip() ? [0, 1] : [1, 0];
|
|
143
|
+
let { texInstruction, texsCorrection, texsAnswer } = texsObjectArray[order[0]];
|
|
144
|
+
texInstruction = replaceVarNames(texInstruction);
|
|
145
|
+
texsCorrection = texsCorrection.map((tex) => replaceVarNames(tex));
|
|
146
|
+
texsAnswer = texsAnswer.map((tex) => replaceVarNames(tex));
|
|
147
|
+
names = order.map((i) => names[i]);
|
|
148
|
+
return getQuestionFromIdentifiers({
|
|
149
|
+
names,
|
|
150
|
+
texInstruction,
|
|
151
|
+
texsCorrection,
|
|
152
|
+
texsAnswer,
|
|
153
|
+
});
|
|
154
|
+
};
|
|
155
|
+
const getQuestionFromIdentifiers = (identifiers, opts) => {
|
|
156
|
+
const question = {
|
|
157
|
+
instruction: getInstruction(identifiers),
|
|
158
|
+
keys: ["inf", "sup", "leq", "geq", ...identifiers.names],
|
|
159
|
+
answerFormat: "tex",
|
|
160
|
+
identifiers,
|
|
161
|
+
hint: getHint(identifiers),
|
|
162
|
+
correction: getCorrection(identifiers),
|
|
163
|
+
options: opts,
|
|
164
|
+
};
|
|
165
|
+
return question;
|
|
166
|
+
};
|
|
167
|
+
export const compareAMinusB = {
|
|
168
|
+
id: "compareAMinusB",
|
|
169
|
+
label: "Comparer deux nombres $a$ et $b$ par le calcul de leur différence.",
|
|
170
|
+
isSingleStep: true,
|
|
171
|
+
generator: (nb, opts) => getDistinctQuestions(() => getCompareAMinusBQuestion(opts), nb, 30),
|
|
172
|
+
qcmTimer: 60,
|
|
173
|
+
freeTimer: 60,
|
|
174
|
+
isAnswerValid,
|
|
175
|
+
getPropositions,
|
|
176
|
+
subject: "Mathématiques",
|
|
177
|
+
maxAllowedQuestions: 30,
|
|
178
|
+
getQuestionFromIdentifiers,
|
|
179
|
+
hasHintAndCorrection: true,
|
|
180
|
+
answerType: "QCM",
|
|
181
|
+
isQCM: true,
|
|
182
|
+
};
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
import { Exercise } from "../../../../exercises/exercise.js";
|
|
2
|
+
type Identifiers = {
|
|
3
|
+
names: string[];
|
|
4
|
+
texInstruction: string;
|
|
5
|
+
texAnswers: string[];
|
|
6
|
+
};
|
|
7
|
+
export declare const compareFromPiMinusFrac: Exercise<Identifiers>;
|
|
8
|
+
export {};
|
|
9
|
+
//# sourceMappingURL=compareFromPiMinusFrac.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"compareFromPiMinusFrac.d.ts","sourceRoot":"","sources":["../../../../../src/exercises/math/calculLitteral/ordering/compareFromPiMinusFrac.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,QAAQ,EAaT,MAAM,6BAA6B,CAAC;AAUrC,KAAK,WAAW,GAAG;IACjB,KAAK,EAAE,MAAM,EAAE,CAAC;IAChB,cAAc,EAAE,MAAM,CAAC;IACvB,UAAU,EAAE,MAAM,EAAE,CAAC;CACtB,CAAC;AAmJF,eAAO,MAAM,sBAAsB,EAAE,QAAQ,CAAC,WAAW,CAgBxD,CAAC"}
|
|
@@ -0,0 +1,144 @@
|
|
|
1
|
+
import { addValidProp, tryToAddWrongProp, } from "../../../../exercises/exercise.js";
|
|
2
|
+
import { getDistinctQuestions } from "../../../../exercises/utils/getDistinctQuestions.js";
|
|
3
|
+
import { PiNode } from "../../../../tree/nodes/numbers/piNode.js";
|
|
4
|
+
import { frac } from "../../../../tree/nodes/operators/fractionNode.js";
|
|
5
|
+
import { substract } from "../../../../tree/nodes/operators/substractNode.js";
|
|
6
|
+
import { coinFlip } from "../../../../utils/alea/coinFlip.js";
|
|
7
|
+
import { random } from "../../../../utils/alea/random.js";
|
|
8
|
+
import { shuffle } from "../../../../utils/alea/shuffle.js";
|
|
9
|
+
const getInstruction = (identifiers) => {
|
|
10
|
+
const { names, texInstruction } = identifiers;
|
|
11
|
+
return `Sachant que
|
|
12
|
+
|
|
13
|
+
$$
|
|
14
|
+
${texInstruction}
|
|
15
|
+
$$
|
|
16
|
+
|
|
17
|
+
comparer $${names[0]}$ et $${names[1]}$.`;
|
|
18
|
+
};
|
|
19
|
+
const getHint = (identifiers) => {
|
|
20
|
+
const { names } = identifiers;
|
|
21
|
+
return `Il faut comparer la valeur de $${names[0]}$ et de $${names[1]}$.`;
|
|
22
|
+
};
|
|
23
|
+
const getCorrection = (identifiers) => {
|
|
24
|
+
const { names, texInstruction, texAnswers } = identifiers;
|
|
25
|
+
return `On a :
|
|
26
|
+
|
|
27
|
+
$$
|
|
28
|
+
${texInstruction}
|
|
29
|
+
$$
|
|
30
|
+
|
|
31
|
+
En ajoutant $${names[1]}$ de chaque côté, on obtient :
|
|
32
|
+
|
|
33
|
+
$$
|
|
34
|
+
${texAnswers[0]}
|
|
35
|
+
$$
|
|
36
|
+
|
|
37
|
+
`;
|
|
38
|
+
};
|
|
39
|
+
const getPropositions = (_, { answer }) => {
|
|
40
|
+
const propositions = [];
|
|
41
|
+
addValidProp(propositions, answer);
|
|
42
|
+
tryToAddWrongProp(propositions, answer
|
|
43
|
+
.replace(">", "TMP(>)")
|
|
44
|
+
.replace("<", "TMP(<)")
|
|
45
|
+
.replace("TMP(>)", "<")
|
|
46
|
+
.replace("TMP(<)", ">"));
|
|
47
|
+
return shuffle(propositions);
|
|
48
|
+
};
|
|
49
|
+
const getAnswer = (identifiers) => {
|
|
50
|
+
const { texAnswers } = identifiers;
|
|
51
|
+
return texAnswers[0];
|
|
52
|
+
};
|
|
53
|
+
const isAnswerValid = (ans, { texAnswers }) => {
|
|
54
|
+
return texAnswers.includes(ans);
|
|
55
|
+
};
|
|
56
|
+
const getCompareFromPiMinusFracQuestion = () => {
|
|
57
|
+
const fracsPool = [
|
|
58
|
+
frac(31, 10),
|
|
59
|
+
frac(314, 100),
|
|
60
|
+
frac(31415926535, 10000000000),
|
|
61
|
+
frac(25, 8),
|
|
62
|
+
frac(22, 7),
|
|
63
|
+
frac(233, 71),
|
|
64
|
+
frac(377, 120),
|
|
65
|
+
frac(256, 81),
|
|
66
|
+
frac(355, 113),
|
|
67
|
+
frac(333, 106),
|
|
68
|
+
frac(339, 108),
|
|
69
|
+
frac(3927, 1250),
|
|
70
|
+
frac(62832, 20000),
|
|
71
|
+
frac(103993, 33102),
|
|
72
|
+
frac(104348, 33215),
|
|
73
|
+
];
|
|
74
|
+
const nodes = [PiNode, random(fracsPool)];
|
|
75
|
+
const compareSymbol = coinFlip() ? ">" : "<";
|
|
76
|
+
const isPiOverFrac = substract(nodes[0], nodes[1]).evaluate() > 0;
|
|
77
|
+
const sortedIndexes = (isPiOverFrac ? +1 : -1) * (compareSymbol === ">" ? +1 : -1) === 1
|
|
78
|
+
? [1, 0]
|
|
79
|
+
: [0, 1];
|
|
80
|
+
const names = sortedIndexes.map((sortedI) => `${nodes[sortedI].toTex()}`);
|
|
81
|
+
let texInstruction;
|
|
82
|
+
let texAnswers;
|
|
83
|
+
if (isPiOverFrac) {
|
|
84
|
+
texInstruction = `${names[0]} - ${names[1]} ${compareSymbol} 0`;
|
|
85
|
+
texAnswers = [
|
|
86
|
+
`${names[0]}${compareSymbol}${names[1]}`,
|
|
87
|
+
`${names[1]}${compareSymbol === ">" ? "<" : ">"}${names[0]}`,
|
|
88
|
+
];
|
|
89
|
+
}
|
|
90
|
+
else {
|
|
91
|
+
texInstruction = `0 ${compareSymbol} ${names[0]} - ${names[1]}`;
|
|
92
|
+
texAnswers = [
|
|
93
|
+
`${names[0]}${compareSymbol === ">" ? "<" : ">"}${names[1]}`,
|
|
94
|
+
`${names[1]}${compareSymbol}${names[0]}`,
|
|
95
|
+
];
|
|
96
|
+
}
|
|
97
|
+
return getQuestionFromIdentifiers({
|
|
98
|
+
names,
|
|
99
|
+
texInstruction,
|
|
100
|
+
texAnswers,
|
|
101
|
+
});
|
|
102
|
+
};
|
|
103
|
+
const getQuestionFromIdentifiers = (identifiers, opts) => {
|
|
104
|
+
const question = {
|
|
105
|
+
answer: getAnswer(identifiers),
|
|
106
|
+
instruction: getInstruction(identifiers),
|
|
107
|
+
keys: [
|
|
108
|
+
"sup",
|
|
109
|
+
"inf",
|
|
110
|
+
...identifiers.names.map((name) => {
|
|
111
|
+
return {
|
|
112
|
+
id: "custom",
|
|
113
|
+
label: name,
|
|
114
|
+
labelType: "tex",
|
|
115
|
+
mathfieldInstructions: {
|
|
116
|
+
method: "write",
|
|
117
|
+
content: name,
|
|
118
|
+
},
|
|
119
|
+
};
|
|
120
|
+
}),
|
|
121
|
+
],
|
|
122
|
+
answerFormat: "tex",
|
|
123
|
+
identifiers,
|
|
124
|
+
hint: getHint(identifiers),
|
|
125
|
+
correction: getCorrection(identifiers),
|
|
126
|
+
options: opts,
|
|
127
|
+
};
|
|
128
|
+
return question;
|
|
129
|
+
};
|
|
130
|
+
export const compareFromPiMinusFrac = {
|
|
131
|
+
id: "compareFromPiMinusFrac",
|
|
132
|
+
label: "Comparer deux nombres (Pi et une fraction approximante) par le calcul de leur différence",
|
|
133
|
+
isSingleStep: true,
|
|
134
|
+
generator: (nb, opts) => getDistinctQuestions(() => getCompareFromPiMinusFracQuestion(opts), nb, 30),
|
|
135
|
+
qcmTimer: 60,
|
|
136
|
+
freeTimer: 60,
|
|
137
|
+
isAnswerValid,
|
|
138
|
+
getPropositions,
|
|
139
|
+
subject: "Mathématiques",
|
|
140
|
+
maxAllowedQuestions: 30,
|
|
141
|
+
getQuestionFromIdentifiers,
|
|
142
|
+
answerType: "QCU",
|
|
143
|
+
hasHintAndCorrection: true,
|
|
144
|
+
};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../../src/exercises/math/calculLitteral/ordering/index.ts"],"names":[],"mappings":"AAAA,cAAc,qBAAqB,CAAC;AACpC,cAAc,6BAA6B,CAAC"}
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
import { Exercise } from "../../../../exercises/exercise.js";
|
|
2
|
+
type Item = {
|
|
3
|
+
tex: string;
|
|
4
|
+
isValidAnswer: boolean;
|
|
5
|
+
};
|
|
6
|
+
type Identifiers = {
|
|
7
|
+
items: Item[];
|
|
8
|
+
};
|
|
9
|
+
export declare const compareATimes0: Exercise<Identifiers>;
|
|
10
|
+
export {};
|
|
11
|
+
//# sourceMappingURL=compareATimes0.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"compareATimes0.d.ts","sourceRoot":"","sources":["../../../../../src/exercises/math/calculLitteral/simplifying/compareATimes0.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,QAAQ,EAWT,MAAM,6BAA6B,CAAC;AAMrC,KAAK,IAAI,GAAG;IACV,GAAG,EAAE,MAAM,CAAC;IACZ,aAAa,EAAE,OAAO,CAAC;CACxB,CAAC;AAEF,KAAK,WAAW,GAAG;IACjB,KAAK,EAAE,IAAI,EAAE,CAAC;CACf,CAAC;AAwHF,eAAO,MAAM,cAAc,EAAE,QAAQ,CAAC,WAAW,CAehD,CAAC"}
|