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,164 @@
|
|
|
1
|
+
import { addValidProp, tryToAddWrongProp, } from "../../../../exercises/exercise.js";
|
|
2
|
+
import { getDistinctQuestions } from "../../../../exercises/utils/getDistinctQuestions.js";
|
|
3
|
+
import { randint } from "../../../../math/utils/random/randint.js";
|
|
4
|
+
import { NodeConstructor, } from "../../../../tree/nodes/nodeConstructor.js";
|
|
5
|
+
import { frac } from "../../../../tree/nodes/operators/fractionNode.js";
|
|
6
|
+
import { power } from "../../../../tree/nodes/operators/powerNode.js";
|
|
7
|
+
import { substract } from "../../../../tree/nodes/operators/substractNode.js";
|
|
8
|
+
import { coinFlip } from "../../../../utils/alea/coinFlip.js";
|
|
9
|
+
import { shuffle } from "../../../../utils/alea/shuffle.js";
|
|
10
|
+
const getInstruction = (identifiers) => {
|
|
11
|
+
const { items } = identifiers;
|
|
12
|
+
return `Voici quatre nombres :
|
|
13
|
+
|
|
14
|
+
${items
|
|
15
|
+
.map((item) => `
|
|
16
|
+
|
|
17
|
+
$$
|
|
18
|
+
${item.name} = ${NodeConstructor.fromIdentifiers(item.nodeIds).toTex()}
|
|
19
|
+
$$
|
|
20
|
+
|
|
21
|
+
`)
|
|
22
|
+
.join("")}
|
|
23
|
+
|
|
24
|
+
Le plus grand de ces quatre nombres est :`;
|
|
25
|
+
};
|
|
26
|
+
const getHint = () => {
|
|
27
|
+
return `Ecris chaque nombre sous la forme d'une fraction.`;
|
|
28
|
+
};
|
|
29
|
+
const getCorrection = (identifiers) => {
|
|
30
|
+
const { items } = identifiers;
|
|
31
|
+
const nodes = items.map((item) => NodeConstructor.fromIdentifiers(item.nodeIds));
|
|
32
|
+
const sortedIndexes = [...Array(nodes.length).keys()].toSorted((i1, i2) => substract(nodes[i1], nodes[i2]).simplify().evaluate());
|
|
33
|
+
const compareSigns = [...Array(sortedIndexes.length).keys()]
|
|
34
|
+
.slice(0, -1)
|
|
35
|
+
.map((i) => {
|
|
36
|
+
const difference = substract(nodes[sortedIndexes[i]], nodes[sortedIndexes[i + 1]])
|
|
37
|
+
.simplify()
|
|
38
|
+
.evaluate();
|
|
39
|
+
const comparison = difference > 0 ? 1 : difference < 0 ? -1 : 0;
|
|
40
|
+
const compSymbol = comparison == 1 ? ">" : comparison == -1 ? "<" : "=";
|
|
41
|
+
return compSymbol;
|
|
42
|
+
});
|
|
43
|
+
const itemGreatest = sortedIndexes.map((sortedI) => items[sortedI])[items.length - 1];
|
|
44
|
+
return `On a :
|
|
45
|
+
|
|
46
|
+
${items
|
|
47
|
+
.toSorted((item1, item2) => item1.name.localeCompare(item2.name))
|
|
48
|
+
.map((item) => {
|
|
49
|
+
const node = NodeConstructor.fromIdentifiers(item.nodeIds);
|
|
50
|
+
return `
|
|
51
|
+
|
|
52
|
+
$$
|
|
53
|
+
${item.name} = ${node.toTex()} = ${node
|
|
54
|
+
.simplify({ calculatePowers: true, distributePowersOnFrac: true })
|
|
55
|
+
.toTex()}
|
|
56
|
+
$$
|
|
57
|
+
|
|
58
|
+
`;
|
|
59
|
+
})
|
|
60
|
+
.join("")}
|
|
61
|
+
|
|
62
|
+
Dans l'ordre croissant :
|
|
63
|
+
|
|
64
|
+
$$
|
|
65
|
+
${sortedIndexes
|
|
66
|
+
.map((sortedI, i) => `${nodes[sortedI]
|
|
67
|
+
.simplify({ calculatePowers: true, distributePowersOnFrac: true })
|
|
68
|
+
.toTex()} ${i < sortedIndexes.length - 1 ? compareSigns[i] : ""}`)
|
|
69
|
+
.join("")}
|
|
70
|
+
$$
|
|
71
|
+
|
|
72
|
+
Le plus grand de ces $${items.length}$ nombres est $${itemGreatest.name}$.
|
|
73
|
+
`;
|
|
74
|
+
};
|
|
75
|
+
const getPropositions = (_, { answer, items }) => {
|
|
76
|
+
const propositions = [];
|
|
77
|
+
items
|
|
78
|
+
.toSorted((item1, item2) => item1.name.localeCompare(item2.name))
|
|
79
|
+
.forEach((item) => {
|
|
80
|
+
if (item.name === answer) {
|
|
81
|
+
addValidProp(propositions, answer);
|
|
82
|
+
}
|
|
83
|
+
else {
|
|
84
|
+
tryToAddWrongProp(propositions, item.name);
|
|
85
|
+
}
|
|
86
|
+
});
|
|
87
|
+
return propositions;
|
|
88
|
+
};
|
|
89
|
+
const getAnswer = (identifiers) => {
|
|
90
|
+
const { items } = identifiers;
|
|
91
|
+
const nodes = items.map((item) => NodeConstructor.fromIdentifiers(item.nodeIds));
|
|
92
|
+
const sortedIndexes = [...Array(items.length).keys()].toSorted((i1, i2) => substract(nodes[i1], nodes[i2]).simplify().evaluate());
|
|
93
|
+
const itemGreatest = sortedIndexes.map((i) => items[i])[items.length - 1];
|
|
94
|
+
return itemGreatest.name;
|
|
95
|
+
};
|
|
96
|
+
const getComparePowersOfFracsQuestion = () => {
|
|
97
|
+
function generateNodes() {
|
|
98
|
+
const a = coinFlip() ? 2 : 3;
|
|
99
|
+
const b = randint(a, 6);
|
|
100
|
+
const c = a + 1;
|
|
101
|
+
const nodes = [
|
|
102
|
+
power(frac(1, a), b),
|
|
103
|
+
power(frac(1, b), a),
|
|
104
|
+
frac(a, 100),
|
|
105
|
+
power(frac(1, c), c),
|
|
106
|
+
];
|
|
107
|
+
return nodes;
|
|
108
|
+
}
|
|
109
|
+
function checkNodes(nodes) {
|
|
110
|
+
const sortedIndexes = [...Array(nodes.length).keys()].toSorted((i1, i2) => substract(nodes[i1], nodes[i2]).simplify().evaluate());
|
|
111
|
+
const compareSigns = [...Array(sortedIndexes.length).keys()]
|
|
112
|
+
.slice(0, -1)
|
|
113
|
+
.map((i) => {
|
|
114
|
+
const difference = substract(nodes[sortedIndexes[i]], nodes[sortedIndexes[i + 1]])
|
|
115
|
+
.simplify()
|
|
116
|
+
.evaluate();
|
|
117
|
+
const comparison = difference > 0 ? 1 : difference < 0 ? -1 : 0;
|
|
118
|
+
const compSymbol = comparison == 1 ? ">" : comparison == -1 ? "<" : "=";
|
|
119
|
+
return compSymbol;
|
|
120
|
+
});
|
|
121
|
+
return compareSigns[compareSigns.length - 1] !== "=";
|
|
122
|
+
}
|
|
123
|
+
let nodes;
|
|
124
|
+
do {
|
|
125
|
+
nodes = generateNodes();
|
|
126
|
+
} while (!checkNodes(nodes));
|
|
127
|
+
const names = ["A", "B", "C", "D"];
|
|
128
|
+
const items = shuffle(nodes).map((node, i) => {
|
|
129
|
+
return {
|
|
130
|
+
name: names[i],
|
|
131
|
+
nodeIds: node.toIdentifiers(),
|
|
132
|
+
};
|
|
133
|
+
});
|
|
134
|
+
return getQuestionFromIdentifiers({
|
|
135
|
+
items,
|
|
136
|
+
});
|
|
137
|
+
};
|
|
138
|
+
const getQuestionFromIdentifiers = (identifiers, opts) => {
|
|
139
|
+
const question = {
|
|
140
|
+
answer: getAnswer(identifiers),
|
|
141
|
+
instruction: getInstruction(identifiers),
|
|
142
|
+
keys: [],
|
|
143
|
+
answerFormat: "tex",
|
|
144
|
+
identifiers,
|
|
145
|
+
hint: getHint(identifiers),
|
|
146
|
+
correction: getCorrection(identifiers),
|
|
147
|
+
options: opts,
|
|
148
|
+
};
|
|
149
|
+
return question;
|
|
150
|
+
};
|
|
151
|
+
export const comparePowersOfFracs = {
|
|
152
|
+
id: "comparePowersOfFracs",
|
|
153
|
+
label: "Comparer des puissances de fractions",
|
|
154
|
+
isSingleStep: true,
|
|
155
|
+
generator: (nb, opts) => getDistinctQuestions(() => getComparePowersOfFracsQuestion(opts), nb, 30),
|
|
156
|
+
qcmTimer: 60,
|
|
157
|
+
freeTimer: 60,
|
|
158
|
+
getPropositions,
|
|
159
|
+
subject: "Mathématiques",
|
|
160
|
+
maxAllowedQuestions: 30,
|
|
161
|
+
getQuestionFromIdentifiers,
|
|
162
|
+
answerType: "QCU",
|
|
163
|
+
hasHintAndCorrection: true,
|
|
164
|
+
};
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
import { Exercise } from "../../../../exercises/exercise.js";
|
|
2
|
+
type Identifiers = {
|
|
3
|
+
a: number;
|
|
4
|
+
b: number;
|
|
5
|
+
isAdd: boolean;
|
|
6
|
+
};
|
|
7
|
+
export declare const compareWithSquareRoots: Exercise<Identifiers>;
|
|
8
|
+
export {};
|
|
9
|
+
//# sourceMappingURL=compareWithSquareRoots.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"compareWithSquareRoots.d.ts","sourceRoot":"","sources":["../../../../../src/exercises/math/calcul/ordering/compareWithSquareRoots.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,QAAQ,EAeT,MAAM,6BAA6B,CAAC;AAQrC,KAAK,WAAW,GAAG;IACjB,CAAC,EAAE,MAAM,CAAC;IACV,CAAC,EAAE,MAAM,CAAC;IACV,KAAK,EAAE,OAAO,CAAC;CAChB,CAAC;AAqKF,eAAO,MAAM,sBAAsB,EAAE,QAAQ,CAAC,WAAW,CAgBxD,CAAC"}
|
|
@@ -0,0 +1,140 @@
|
|
|
1
|
+
import { addValidProp, shuffleProps, tryToAddWrongProp, } from "../../../../exercises/exercise.js";
|
|
2
|
+
import { getDistinctQuestions } from "../../../../exercises/utils/getDistinctQuestions.js";
|
|
3
|
+
import { randint } from "../../../../math/utils/random/randint.js";
|
|
4
|
+
import { parseAlgebraic } from "../../../../tree/parsers/latexParser.js";
|
|
5
|
+
import { coinFlip } from "../../../../utils/alea/coinFlip.js";
|
|
6
|
+
import { handleVEAError } from "../../../../utils/errors/handleVEAError.js";
|
|
7
|
+
const getInstruction = (identifiers) => {
|
|
8
|
+
const { a, b, isAdd } = identifiers;
|
|
9
|
+
return `Sachant que $\\sqrt{${a}} < \\sqrt{${a + 1}}$,
|
|
10
|
+
|
|
11
|
+
comparer $${b} ${isAdd ? "+" : "-"} \\sqrt{${a}}$ et $${b} ${isAdd ? "+" : "-"} \\sqrt{${a + 1}}$.`;
|
|
12
|
+
};
|
|
13
|
+
const getHint = (identifiers) => {
|
|
14
|
+
const { a, b, isAdd } = identifiers;
|
|
15
|
+
return `En partant de $\\sqrt{${a}} < \\sqrt{${a + 1}}$,
|
|
16
|
+
|
|
17
|
+
essaie de te ramener à $${b} ${isAdd ? "+" : "-"} \\sqrt{${a}}$ <(ou >) $${b} ${isAdd ? "+" : "-"} \\sqrt{${a + 1}}$
|
|
18
|
+
|
|
19
|
+
par des opérations que l'on effectue à droite et à gauche de l'inégalité.
|
|
20
|
+
|
|
21
|
+
Attention si tu multiplies à droite et à gauche d'une inégalité par un nombre négatif, l'inégalité se renverse.`;
|
|
22
|
+
};
|
|
23
|
+
const getCorrection = (identifiers) => {
|
|
24
|
+
const { a, b, isAdd } = identifiers;
|
|
25
|
+
return `
|
|
26
|
+
|
|
27
|
+
$$
|
|
28
|
+
\\sqrt{${a}} < \\sqrt{${a + 1}}
|
|
29
|
+
$$
|
|
30
|
+
|
|
31
|
+
${isAdd
|
|
32
|
+
? ``
|
|
33
|
+
: `On multiplie par $-1$ des deux côtés et on renverse l'inégalité :
|
|
34
|
+
|
|
35
|
+
$$
|
|
36
|
+
-\\sqrt{${a}} > -\\sqrt{${a + 1}}
|
|
37
|
+
$$
|
|
38
|
+
|
|
39
|
+
`}
|
|
40
|
+
On ajoute $${b}$ de chaque côté de l'inégalité :
|
|
41
|
+
|
|
42
|
+
$$
|
|
43
|
+
${b} ${isAdd ? "+" : "-"} \\sqrt{${a}} ${isAdd ? "<" : ">"} ${b} ${isAdd ? "+" : "-"} \\sqrt{${a + 1}}
|
|
44
|
+
$$
|
|
45
|
+
|
|
46
|
+
`;
|
|
47
|
+
};
|
|
48
|
+
const getAnswer = (identifiers) => {
|
|
49
|
+
const { a, b, isAdd } = identifiers;
|
|
50
|
+
return `${b} ${isAdd ? "+" : "-"} \\sqrt{${a}} ${isAdd ? "<" : ">"} ${b} ${isAdd ? "+" : "-"} \\sqrt{${a + 1}}`;
|
|
51
|
+
};
|
|
52
|
+
const isAnswerValid = (ans, { answer }) => {
|
|
53
|
+
function getOrderedNodesFromTex(tex, compSymbol) {
|
|
54
|
+
return tex
|
|
55
|
+
.split(compSymbol)
|
|
56
|
+
.map((str) => parseAlgebraic(str))
|
|
57
|
+
.toSorted(() => (compSymbol === "<" ? -1 : +1));
|
|
58
|
+
}
|
|
59
|
+
try {
|
|
60
|
+
const compSymbol = ans.includes("<")
|
|
61
|
+
? "<"
|
|
62
|
+
: ans.includes(">")
|
|
63
|
+
? ">"
|
|
64
|
+
: undefined;
|
|
65
|
+
if (compSymbol) {
|
|
66
|
+
const [ansNode1, ansNode2] = getOrderedNodesFromTex(ans, compSymbol);
|
|
67
|
+
const [answerNode1, answerNode2] = getOrderedNodesFromTex(answer, "<");
|
|
68
|
+
return (ansNode1.simplify().equals(answerNode1.simplify()) &&
|
|
69
|
+
ansNode2.simplify().equals(answerNode2.simplify()));
|
|
70
|
+
}
|
|
71
|
+
else {
|
|
72
|
+
return false;
|
|
73
|
+
}
|
|
74
|
+
}
|
|
75
|
+
catch (err) {
|
|
76
|
+
return handleVEAError(err);
|
|
77
|
+
}
|
|
78
|
+
};
|
|
79
|
+
const getPropositions = (nbProps, { answer, ...identifiers }) => {
|
|
80
|
+
const { a, b, isAdd } = identifiers;
|
|
81
|
+
const propositions = [];
|
|
82
|
+
addValidProp(propositions, `${b} ${isAdd ? "+" : "-"} \\sqrt{${a}} ${isAdd ? "<" : ">"} ${b} ${isAdd ? "+" : "-"} \\sqrt{${a + 1}}`, "tex");
|
|
83
|
+
tryToAddWrongProp(propositions, `${b} ${!isAdd ? "+" : "-"} \\sqrt{${a}} ${!isAdd ? "<" : ">"} ${b} ${!isAdd ? "+" : "-"} \\sqrt{${a + 1}}`, "tex");
|
|
84
|
+
return shuffleProps(propositions, nbProps);
|
|
85
|
+
};
|
|
86
|
+
const getKeys = (identifiers) => {
|
|
87
|
+
const { a, b, isAdd } = identifiers;
|
|
88
|
+
return [
|
|
89
|
+
"inf",
|
|
90
|
+
"sup",
|
|
91
|
+
...[
|
|
92
|
+
`${b} ${isAdd ? "+" : "-"} \\sqrt{${a}}`,
|
|
93
|
+
`${b} ${isAdd ? "+" : "-"} \\sqrt{${a + 1}}`,
|
|
94
|
+
].map((tex) => {
|
|
95
|
+
return {
|
|
96
|
+
id: "custom",
|
|
97
|
+
label: tex,
|
|
98
|
+
labelType: "tex",
|
|
99
|
+
mathfieldInstructions: {
|
|
100
|
+
method: "write",
|
|
101
|
+
content: tex,
|
|
102
|
+
},
|
|
103
|
+
};
|
|
104
|
+
}),
|
|
105
|
+
];
|
|
106
|
+
};
|
|
107
|
+
const getCompareWithSquareRootsQuestion = () => {
|
|
108
|
+
const a = randint(2, 150);
|
|
109
|
+
const b = randint(1, 100);
|
|
110
|
+
const isAdd = coinFlip();
|
|
111
|
+
return getQuestionFromIdentifiers({ a, b, isAdd });
|
|
112
|
+
};
|
|
113
|
+
const getQuestionFromIdentifiers = (identifiers) => {
|
|
114
|
+
const question = {
|
|
115
|
+
answer: getAnswer(identifiers),
|
|
116
|
+
instruction: getInstruction(identifiers),
|
|
117
|
+
keys: getKeys(identifiers),
|
|
118
|
+
answerFormat: "tex",
|
|
119
|
+
identifiers,
|
|
120
|
+
hint: getHint(identifiers),
|
|
121
|
+
correction: getCorrection(identifiers),
|
|
122
|
+
};
|
|
123
|
+
return question;
|
|
124
|
+
};
|
|
125
|
+
export const compareWithSquareRoots = {
|
|
126
|
+
id: "compareWithSquareRoots",
|
|
127
|
+
label: "Comparer deux nombres directement (avec des racines carrées)",
|
|
128
|
+
isSingleStep: true,
|
|
129
|
+
generator: (nb) => getDistinctQuestions(() => getCompareWithSquareRootsQuestion(), nb, 30),
|
|
130
|
+
qcmTimer: 60,
|
|
131
|
+
freeTimer: 60,
|
|
132
|
+
getPropositions,
|
|
133
|
+
isAnswerValid,
|
|
134
|
+
getAnswer,
|
|
135
|
+
subject: "Mathématiques",
|
|
136
|
+
maxAllowedQuestions: 30,
|
|
137
|
+
getQuestionFromIdentifiers,
|
|
138
|
+
answerType: "QCU",
|
|
139
|
+
hasHintAndCorrection: true,
|
|
140
|
+
};
|
|
@@ -2,4 +2,10 @@ export * from "./integerOrdering.js";
|
|
|
2
2
|
export * from "./decimalOrdering.js";
|
|
3
3
|
export * from "./framing.js";
|
|
4
4
|
export * from "./decimalOrderingNoRelatives.js";
|
|
5
|
+
export * from "./compareFracAndDec.js";
|
|
6
|
+
export * from "./compareA10N.js";
|
|
7
|
+
export * from "./compareABUsingQuotient.js";
|
|
8
|
+
export * from "./comparePowersOfFracs.js";
|
|
9
|
+
export * from "./compareFracABWithFracAPlusCBPlusC.js";
|
|
10
|
+
export * from "./compareWithSquareRoots.js";
|
|
5
11
|
//# sourceMappingURL=index.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../../src/exercises/math/calcul/ordering/index.ts"],"names":[],"mappings":"AAAA,cAAc,sBAAsB,CAAC;AACrC,cAAc,sBAAsB,CAAC;AACrC,cAAc,cAAc,CAAC;AAC7B,cAAc,iCAAiC,CAAC"}
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../../src/exercises/math/calcul/ordering/index.ts"],"names":[],"mappings":"AAAA,cAAc,sBAAsB,CAAC;AACrC,cAAc,sBAAsB,CAAC;AACrC,cAAc,cAAc,CAAC;AAC7B,cAAc,iCAAiC,CAAC;AAChD,cAAc,wBAAwB,CAAC;AACvC,cAAc,kBAAkB,CAAC;AACjC,cAAc,6BAA6B,CAAC;AAC5C,cAAc,2BAA2B,CAAC;AAC1C,cAAc,wCAAwC,CAAC;AACvD,cAAc,6BAA6B,CAAC"}
|
|
@@ -2,3 +2,9 @@ export * from "./integerOrdering.js";
|
|
|
2
2
|
export * from "./decimalOrdering.js";
|
|
3
3
|
export * from "./framing.js";
|
|
4
4
|
export * from "./decimalOrderingNoRelatives.js";
|
|
5
|
+
export * from "./compareFracAndDec.js";
|
|
6
|
+
export * from "./compareA10N.js";
|
|
7
|
+
export * from "./compareABUsingQuotient.js";
|
|
8
|
+
export * from "./comparePowersOfFracs.js";
|
|
9
|
+
export * from "./compareFracABWithFracAPlusCBPlusC.js";
|
|
10
|
+
export * from "./compareWithSquareRoots.js";
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
import { Exercise } from "../../../../exercises/exercise.js";
|
|
2
|
+
type Identifiers = {
|
|
3
|
+
n: number;
|
|
4
|
+
c: number;
|
|
5
|
+
d: number;
|
|
6
|
+
};
|
|
7
|
+
export declare const estimateAroundPow10NTimesAroundPow10N: Exercise<Identifiers>;
|
|
8
|
+
export {};
|
|
9
|
+
//# sourceMappingURL=estimateAroundPow10NTimesAroundPow10N.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"estimateAroundPow10NTimesAroundPow10N.d.ts","sourceRoot":"","sources":["../../../../../src/exercises/math/calcul/rounding/estimateAroundPow10NTimesAroundPow10N.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,QAAQ,EAcT,MAAM,6BAA6B,CAAC;AAerC,KAAK,WAAW,GAAG;IACjB,CAAC,EAAE,MAAM,CAAC;IACV,CAAC,EAAE,MAAM,CAAC;IACV,CAAC,EAAE,MAAM,CAAC;CACX,CAAC;AA+EF,eAAO,MAAM,qCAAqC,EAAE,QAAQ,CAAC,WAAW,CAoBvE,CAAC"}
|
|
@@ -0,0 +1,84 @@
|
|
|
1
|
+
import { addValidProp, shuffleProps, tryToAddWrongProp, } from "../../../../exercises/exercise.js";
|
|
2
|
+
import { getDistinctQuestions } from "../../../../exercises/utils/getDistinctQuestions.js";
|
|
3
|
+
import { randint } from "../../../../math/utils/random/randint.js";
|
|
4
|
+
import { add } from "../../../../tree/nodes/operators/addNode.js";
|
|
5
|
+
import { power } from "../../../../tree/nodes/operators/powerNode.js";
|
|
6
|
+
import { parseAlgebraic } from "../../../../tree/parsers/latexParser.js";
|
|
7
|
+
import { coinFlip } from "../../../../utils/alea/coinFlip.js";
|
|
8
|
+
import { handleVEAError } from "../../../../utils/errors/handleVEAError.js";
|
|
9
|
+
import { toSeperatedThousands } from "../../../../utils/numberPrototype/toSeparatedThousands.js";
|
|
10
|
+
const toPrettyString = (node) => {
|
|
11
|
+
return toSeperatedThousands("" + node.evaluate().toFixed(0));
|
|
12
|
+
};
|
|
13
|
+
const getInstruction = (identifiers) => {
|
|
14
|
+
const { n, c, d } = identifiers;
|
|
15
|
+
const [tex1, tex2] = [c, d].map((k) => toPrettyString(add(power(10, n), k)));
|
|
16
|
+
return `Laquelle de ces propositions est un ordre de grandeur de $${tex1} \\times ${tex2}$ ?`;
|
|
17
|
+
};
|
|
18
|
+
const getHint = (identifiers) => {
|
|
19
|
+
const { n } = identifiers;
|
|
20
|
+
return `Les deux facteurs sont tous les deux proches de $10^{${n}}$.`;
|
|
21
|
+
};
|
|
22
|
+
const getCorrection = (identifiers) => {
|
|
23
|
+
const { n, c, d } = identifiers;
|
|
24
|
+
const [tex1, tex2] = [c, d].map((k) => toPrettyString(add(power(10, n), k)));
|
|
25
|
+
return `$(${tex1} \\times ${tex2})$ est proche de $(10^{${n}} \\times 10^{${n}})$ et donc de $10^{${2 * n}}$ `;
|
|
26
|
+
};
|
|
27
|
+
const getAnswer = (identifiers) => {
|
|
28
|
+
const { n } = identifiers;
|
|
29
|
+
return `10^{${2 * n}}`;
|
|
30
|
+
};
|
|
31
|
+
const isAnswerValid = (ans, { answer }) => {
|
|
32
|
+
try {
|
|
33
|
+
const ansNode = parseAlgebraic(ans);
|
|
34
|
+
const answerNode = parseAlgebraic(answer);
|
|
35
|
+
return ansNode
|
|
36
|
+
.simplify({ calculatePowers: true })
|
|
37
|
+
.equals(answerNode.simplify({ calculatePowers: true }));
|
|
38
|
+
}
|
|
39
|
+
catch (err) {
|
|
40
|
+
return handleVEAError(err);
|
|
41
|
+
}
|
|
42
|
+
};
|
|
43
|
+
const getPropositions = (nbProps, { answer, ...identifiers }) => {
|
|
44
|
+
const { n } = identifiers;
|
|
45
|
+
const propositions = [];
|
|
46
|
+
addValidProp(propositions, toPrettyString(power(10, 2 * n)), "tex");
|
|
47
|
+
tryToAddWrongProp(propositions, toPrettyString(power(10, n)), "tex");
|
|
48
|
+
tryToAddWrongProp(propositions, toPrettyString(power(10, n + 1)), "tex");
|
|
49
|
+
tryToAddWrongProp(propositions, toPrettyString(power(10, 2 * n + 2)), "tex");
|
|
50
|
+
return shuffleProps(propositions, nbProps);
|
|
51
|
+
};
|
|
52
|
+
const getEstimatePow10NPlusPow10MinusNQuestion = () => {
|
|
53
|
+
const n = randint(1, 5);
|
|
54
|
+
const [c, d] = [0, 1].map(() => (coinFlip() ? 1 : -1) * randint(1, 3));
|
|
55
|
+
return getQuestionFromIdentifiers({ n, c, d });
|
|
56
|
+
};
|
|
57
|
+
const getQuestionFromIdentifiers = (identifiers) => {
|
|
58
|
+
const question = {
|
|
59
|
+
answer: getAnswer(identifiers),
|
|
60
|
+
instruction: getInstruction(identifiers),
|
|
61
|
+
keys: [],
|
|
62
|
+
answerFormat: "tex",
|
|
63
|
+
identifiers,
|
|
64
|
+
hint: getHint(identifiers),
|
|
65
|
+
correction: getCorrection(identifiers),
|
|
66
|
+
};
|
|
67
|
+
return question;
|
|
68
|
+
};
|
|
69
|
+
export const estimateAroundPow10NTimesAroundPow10N = {
|
|
70
|
+
id: "estimateAroundPow10NTimesAroundPow10N",
|
|
71
|
+
label: "Donner un ordre de grandeur de ($10^{n}+c)(10^{n}+c')$",
|
|
72
|
+
isSingleStep: true,
|
|
73
|
+
generator: (nb) => getDistinctQuestions(() => getEstimatePow10NPlusPow10MinusNQuestion(), nb, 30),
|
|
74
|
+
qcmTimer: 60,
|
|
75
|
+
freeTimer: 60,
|
|
76
|
+
getPropositions,
|
|
77
|
+
isAnswerValid,
|
|
78
|
+
getAnswer,
|
|
79
|
+
subject: "Mathématiques",
|
|
80
|
+
maxAllowedQuestions: 30,
|
|
81
|
+
getQuestionFromIdentifiers,
|
|
82
|
+
answerType: "QCU",
|
|
83
|
+
hasHintAndCorrection: true,
|
|
84
|
+
};
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
import { Exercise } from "../../../../exercises/exercise.js";
|
|
2
|
+
type Identifiers = {
|
|
3
|
+
n: number;
|
|
4
|
+
varName: string;
|
|
5
|
+
};
|
|
6
|
+
export declare const estimatePow10NPlusPow10MinusN: Exercise<Identifiers>;
|
|
7
|
+
export {};
|
|
8
|
+
//# sourceMappingURL=estimatePow10NPlusPow10MinusN.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"estimatePow10NPlusPow10MinusN.d.ts","sourceRoot":"","sources":["../../../../../src/exercises/math/calcul/rounding/estimatePow10NPlusPow10MinusN.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,QAAQ,EAcT,MAAM,6BAA6B,CAAC;AAQrC,KAAK,WAAW,GAAG;IACjB,CAAC,EAAE,MAAM,CAAC;IACV,OAAO,EAAE,MAAM,CAAC;CACjB,CAAC;AAwFF,eAAO,MAAM,6BAA6B,EAAE,QAAQ,CAAC,WAAW,CAoB/D,CAAC"}
|
|
@@ -0,0 +1,90 @@
|
|
|
1
|
+
import { addValidProp, shuffleProps, tryToAddWrongProp, } from "../../../../exercises/exercise.js";
|
|
2
|
+
import { getDistinctQuestions } from "../../../../exercises/utils/getDistinctQuestions.js";
|
|
3
|
+
import { randint } from "../../../../math/utils/random/randint.js";
|
|
4
|
+
import { power } from "../../../../tree/nodes/operators/powerNode.js";
|
|
5
|
+
import { parseAlgebraic } from "../../../../tree/parsers/latexParser.js";
|
|
6
|
+
import { random } from "../../../../utils/alea/random.js";
|
|
7
|
+
import { handleVEAError } from "../../../../utils/errors/handleVEAError.js";
|
|
8
|
+
const getInstruction = (identifiers) => {
|
|
9
|
+
const { n, varName } = identifiers;
|
|
10
|
+
const A = varName;
|
|
11
|
+
return `On considère $${A}=10^{${n}}+10^{-${n}}$.
|
|
12
|
+
|
|
13
|
+
À quoi $A$ est-il environ égal ?`;
|
|
14
|
+
};
|
|
15
|
+
const getHint = (identifiers) => {
|
|
16
|
+
const { n } = identifiers;
|
|
17
|
+
return `Combien vaut $10^{${n}}$ ? et $10^{-${n}}$ ?`;
|
|
18
|
+
};
|
|
19
|
+
const getCorrection = (identifiers) => {
|
|
20
|
+
const { n, varName } = identifiers;
|
|
21
|
+
const A = varName;
|
|
22
|
+
return `
|
|
23
|
+
$$
|
|
24
|
+
10^{${n}} = ${("" + power(10, n).evaluate().toFixed(0)).replace(".", ",")}
|
|
25
|
+
$$
|
|
26
|
+
|
|
27
|
+
$$
|
|
28
|
+
10^{${-n}} = ${("" + power(10, -n).evaluate().toFixed(n)).replace(".", ",")}
|
|
29
|
+
$$
|
|
30
|
+
|
|
31
|
+
Comme $10^{${n}}$ est largement supérieur à $10^{-${n}}$, un ordre de grandeur de $${A}$ est $10^{${n}}$.`;
|
|
32
|
+
};
|
|
33
|
+
const getAnswer = (identifiers) => {
|
|
34
|
+
const { n } = identifiers;
|
|
35
|
+
return `10^{${n}}`;
|
|
36
|
+
};
|
|
37
|
+
const isAnswerValid = (ans, { answer }) => {
|
|
38
|
+
try {
|
|
39
|
+
const ansNode = parseAlgebraic(ans);
|
|
40
|
+
const answerNode = parseAlgebraic(answer);
|
|
41
|
+
return ansNode.simplify().equals(answerNode.simplify());
|
|
42
|
+
}
|
|
43
|
+
catch (err) {
|
|
44
|
+
return handleVEAError(err);
|
|
45
|
+
}
|
|
46
|
+
};
|
|
47
|
+
const getPropositions = (nbProps, { answer, ...identifiers }) => {
|
|
48
|
+
const { n } = identifiers;
|
|
49
|
+
const propositions = [];
|
|
50
|
+
addValidProp(propositions, `10^{${n}}`, "tex");
|
|
51
|
+
tryToAddWrongProp(propositions, `${(0).frenchify()}`, "tex");
|
|
52
|
+
tryToAddWrongProp(propositions, `10^0`, "tex");
|
|
53
|
+
tryToAddWrongProp(propositions, `100^0`, "tex");
|
|
54
|
+
tryToAddWrongProp(propositions, `20^{-{${n}^2}}`, "tex");
|
|
55
|
+
tryToAddWrongProp(propositions, `20^{${n}}`, "tex");
|
|
56
|
+
return shuffleProps(propositions, nbProps);
|
|
57
|
+
};
|
|
58
|
+
const getEstimatePow10NPlusPow10MinusNQuestion = () => {
|
|
59
|
+
const n = randint(0, 15, [0]);
|
|
60
|
+
const varName = random(["A", "B", "C", "D", "E"]);
|
|
61
|
+
return getQuestionFromIdentifiers({ n, varName });
|
|
62
|
+
};
|
|
63
|
+
const getQuestionFromIdentifiers = (identifiers) => {
|
|
64
|
+
const question = {
|
|
65
|
+
answer: getAnswer(identifiers),
|
|
66
|
+
instruction: getInstruction(identifiers),
|
|
67
|
+
keys: [],
|
|
68
|
+
answerFormat: "tex",
|
|
69
|
+
identifiers,
|
|
70
|
+
hint: getHint(identifiers),
|
|
71
|
+
correction: getCorrection(identifiers),
|
|
72
|
+
};
|
|
73
|
+
return question;
|
|
74
|
+
};
|
|
75
|
+
export const estimatePow10NPlusPow10MinusN = {
|
|
76
|
+
id: "estimatePow10NPlusPow10MinusN",
|
|
77
|
+
label: "Estimer $10^{n}+10^{-n}$",
|
|
78
|
+
isSingleStep: true,
|
|
79
|
+
generator: (nb) => getDistinctQuestions(() => getEstimatePow10NPlusPow10MinusNQuestion(), nb, 30),
|
|
80
|
+
qcmTimer: 60,
|
|
81
|
+
freeTimer: 60,
|
|
82
|
+
getPropositions,
|
|
83
|
+
isAnswerValid,
|
|
84
|
+
getAnswer,
|
|
85
|
+
subject: "Mathématiques",
|
|
86
|
+
maxAllowedQuestions: 30,
|
|
87
|
+
getQuestionFromIdentifiers,
|
|
88
|
+
answerType: "QCU",
|
|
89
|
+
hasHintAndCorrection: true,
|
|
90
|
+
};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../../src/exercises/math/calcul/rounding/index.ts"],"names":[],"mappings":"AAAA,cAAc,eAAe,CAAC;AAC9B,cAAc,kCAAkC,CAAC"}
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../../src/exercises/math/calcul/rounding/index.ts"],"names":[],"mappings":"AAAA,cAAc,eAAe,CAAC;AAC9B,cAAc,kCAAkC,CAAC;AACjD,cAAc,oCAAoC,CAAC;AACnD,cAAc,4CAA4C,CAAC"}
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
import { Exercise } from "../../../../exercises/exercise.js";
|
|
2
|
+
import { AlgebraicNode } from "../../../../tree/nodes/algebraicNode.js";
|
|
3
|
+
import { NodeIdentifiers } from "../../../../tree/nodes/nodeConstructor.js";
|
|
4
|
+
type Identifiers = {
|
|
5
|
+
problemSkeletonIndex: number;
|
|
6
|
+
groupNameToVarNameToValue: Record<string, Record<string, AlgebraicNode>>;
|
|
7
|
+
mysteryVarPath: string;
|
|
8
|
+
shuffleArrays: number[][];
|
|
9
|
+
equalNodeIds: NodeIdentifiers;
|
|
10
|
+
};
|
|
11
|
+
export declare const equationFromProblem: Exercise<Identifiers>;
|
|
12
|
+
export {};
|
|
13
|
+
//# sourceMappingURL=equationFromProblem.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"equationFromProblem.d.ts","sourceRoot":"","sources":["../../../../../src/exercises/math/calculLitteral/equation/equationFromProblem.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,QAAQ,EAaT,MAAM,6BAA6B,CAAC;AAKrC,OAAO,EAAE,aAAa,EAAE,MAAM,mCAAmC,CAAC;AAKlE,OAAO,EAAE,eAAe,EAAE,MAAM,qCAAqC,CAAC;AActE,KAAK,WAAW,GAAG;IACjB,oBAAoB,EAAE,MAAM,CAAC;IAC7B,yBAAyB,EAAE,MAAM,CAAC,MAAM,EAAE,MAAM,CAAC,MAAM,EAAE,aAAa,CAAC,CAAC,CAAC;IACzE,cAAc,EAAE,MAAM,CAAC;IACvB,aAAa,EAAE,MAAM,EAAE,EAAE,CAAC;IAC1B,YAAY,EAAE,eAAe,CAAC;CAC/B,CAAC;AA0mBF,eAAO,MAAM,mBAAmB,EAAE,QAAQ,CAAC,WAAW,CAarD,CAAC"}
|