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,120 @@
|
|
|
1
|
+
import { addValidProp, tryToAddWrongProp, } from "../../../../exercises/exercise.js";
|
|
2
|
+
import { getDistinctQuestions } from "../../../../exercises/utils/getDistinctQuestions.js";
|
|
3
|
+
import { probaLawFlip } from "../../../../utils/alea/probaLawFlip.js";
|
|
4
|
+
import { shuffle } from "../../../../utils/alea/shuffle.js";
|
|
5
|
+
import { permute } from "../../../../utils/arrays/permutations.js";
|
|
6
|
+
const getInstruction = () => {
|
|
7
|
+
return `Soit a un nombre non nul.
|
|
8
|
+
|
|
9
|
+
Parmi les propositions suivantes, lesquelles sont vraies ?`;
|
|
10
|
+
};
|
|
11
|
+
const getHint = () => {
|
|
12
|
+
return `$0$ divisé par un nombre non nul donne $0$.
|
|
13
|
+
|
|
14
|
+
$0$ multiplié par n'importe quel nombre donne $0$.`;
|
|
15
|
+
};
|
|
16
|
+
const getCorrection = () => {
|
|
17
|
+
return `
|
|
18
|
+
|
|
19
|
+
$$
|
|
20
|
+
0 \\times a = 0
|
|
21
|
+
$$
|
|
22
|
+
|
|
23
|
+
et
|
|
24
|
+
|
|
25
|
+
$$
|
|
26
|
+
\\frac{0}{a} = 0
|
|
27
|
+
$$
|
|
28
|
+
|
|
29
|
+
donc
|
|
30
|
+
|
|
31
|
+
$$
|
|
32
|
+
0 \\times a = \\frac{0}{a} = 0
|
|
33
|
+
$$
|
|
34
|
+
|
|
35
|
+
`;
|
|
36
|
+
};
|
|
37
|
+
const getPropositions = (_, { answer, ...identifiers }) => {
|
|
38
|
+
const { items } = identifiers;
|
|
39
|
+
const propositions = [];
|
|
40
|
+
items.forEach((item) => {
|
|
41
|
+
if (item.isValidAnswer) {
|
|
42
|
+
addValidProp(propositions, item.tex, "raw");
|
|
43
|
+
}
|
|
44
|
+
else {
|
|
45
|
+
tryToAddWrongProp(propositions, item.tex, "raw");
|
|
46
|
+
}
|
|
47
|
+
});
|
|
48
|
+
return propositions;
|
|
49
|
+
};
|
|
50
|
+
const getCompareATimes0Question = () => {
|
|
51
|
+
const nbTotal = 4;
|
|
52
|
+
const nbValid = probaLawFlip([
|
|
53
|
+
[1, 0.5],
|
|
54
|
+
[2, 0.45],
|
|
55
|
+
[3, 0.03],
|
|
56
|
+
[4, 0.02],
|
|
57
|
+
]);
|
|
58
|
+
const nbInvalid = nbTotal - nbValid;
|
|
59
|
+
const arrayOfTex = [`0 \\times a`, `\\frac{0}{a}`, `0`];
|
|
60
|
+
const permutations = permute(arrayOfTex);
|
|
61
|
+
const validItems = permutations.flatMap(([tex1, tex2, tex3]) => {
|
|
62
|
+
return [
|
|
63
|
+
`$${[tex1, tex2, tex3].join("=")}$`,
|
|
64
|
+
`$${tex1}=${tex2}$ et $${tex2}=${tex3}$`,
|
|
65
|
+
].map((tex) => {
|
|
66
|
+
return {
|
|
67
|
+
tex,
|
|
68
|
+
isValidAnswer: true,
|
|
69
|
+
};
|
|
70
|
+
});
|
|
71
|
+
});
|
|
72
|
+
const invalidItems = permutations.flatMap(([tex1, tex2, tex3]) => {
|
|
73
|
+
return [
|
|
74
|
+
`$${tex1}>${tex2}$ et $${tex2}=${tex3}$`,
|
|
75
|
+
`$${tex1}=${tex2}$ et $${tex2}>${tex3}$`,
|
|
76
|
+
...(tex3 === `\\frac{0}{a}`
|
|
77
|
+
? [`$${tex1}=${tex2}$ et $${tex3}$ n'existe pas`]
|
|
78
|
+
: []),
|
|
79
|
+
...(tex1 === `\\frac{0}{a}`
|
|
80
|
+
? [`$${tex1}$ n'existe pas et $${tex2}=${tex3}$`]
|
|
81
|
+
: []),
|
|
82
|
+
].map((tex) => {
|
|
83
|
+
return {
|
|
84
|
+
tex,
|
|
85
|
+
isValidAnswer: false,
|
|
86
|
+
};
|
|
87
|
+
});
|
|
88
|
+
});
|
|
89
|
+
const items = shuffle([
|
|
90
|
+
...shuffle(validItems).slice(0, nbValid),
|
|
91
|
+
...shuffle(invalidItems).slice(0, nbInvalid),
|
|
92
|
+
]);
|
|
93
|
+
return getQuestionFromIdentifiers({ items });
|
|
94
|
+
};
|
|
95
|
+
const getQuestionFromIdentifiers = (identifiers) => {
|
|
96
|
+
const question = {
|
|
97
|
+
instruction: getInstruction(identifiers),
|
|
98
|
+
keys: [],
|
|
99
|
+
answerFormat: "tex",
|
|
100
|
+
identifiers,
|
|
101
|
+
hint: getHint(identifiers),
|
|
102
|
+
correction: getCorrection(identifiers),
|
|
103
|
+
};
|
|
104
|
+
return question;
|
|
105
|
+
};
|
|
106
|
+
export const compareATimes0 = {
|
|
107
|
+
id: "compareATimes0",
|
|
108
|
+
label: "Comparer $0$ , $0 \\times a$ et $\\frac{0}{a}$",
|
|
109
|
+
isSingleStep: true,
|
|
110
|
+
generator: (nb) => getDistinctQuestions(() => getCompareATimes0Question(), nb, 30),
|
|
111
|
+
qcmTimer: 60,
|
|
112
|
+
freeTimer: 60,
|
|
113
|
+
getPropositions,
|
|
114
|
+
subject: "Mathématiques",
|
|
115
|
+
maxAllowedQuestions: 30,
|
|
116
|
+
getQuestionFromIdentifiers,
|
|
117
|
+
answerType: "QCM",
|
|
118
|
+
isQCM: true,
|
|
119
|
+
hasHintAndCorrection: true,
|
|
120
|
+
};
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
import { Exercise } from "../../../../exercises/exercise.js";
|
|
2
|
+
import { NodeIdentifiers } from "../../../../tree/nodes/nodeConstructor.js";
|
|
3
|
+
type Identifiers = {
|
|
4
|
+
nodeIds: NodeIdentifiers[];
|
|
5
|
+
};
|
|
6
|
+
export declare const compareFracXA: Exercise<Identifiers>;
|
|
7
|
+
export {};
|
|
8
|
+
//# sourceMappingURL=compareFracXA.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"compareFracXA.d.ts","sourceRoot":"","sources":["../../../../../src/exercises/math/calculLitteral/simplifying/compareFracXA.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,QAAQ,EAWT,MAAM,6BAA6B,CAAC;AAGrC,OAAO,EAEL,eAAe,EAChB,MAAM,qCAAqC,CAAC;AAO7C,KAAK,WAAW,GAAG;IACjB,OAAO,EAAE,eAAe,EAAE,CAAC;CAC5B,CAAC;AAkFF,eAAO,MAAM,aAAa,EAAE,QAAQ,CAAC,WAAW,CAe/C,CAAC"}
|
|
@@ -0,0 +1,67 @@
|
|
|
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 { multiply, } from "../../../../tree/nodes/operators/multiplyNode.js";
|
|
7
|
+
const getInstruction = (identifiers) => {
|
|
8
|
+
const { nodeIds } = identifiers;
|
|
9
|
+
const nodes = nodeIds.map((nodeIds) => NodeConstructor.fromIdentifiers(nodeIds));
|
|
10
|
+
return `Paul a tracé sur sa calculatrice la représentation graphique de $y=${nodes[0].toTex()}$
|
|
11
|
+
et Virginie a tracé sur sa calculatrice la représentation graphique de $y=${nodes[1].leftChild.toTex()} \\times ${nodes[1].rightChild.toTex()}$.
|
|
12
|
+
|
|
13
|
+
Quelle affirmation est exacte ?`;
|
|
14
|
+
};
|
|
15
|
+
const getHint = () => {
|
|
16
|
+
return `Compare $\\frac{x}{a}$ et $\\frac{1}{a}\\times x$ avec $a$ différent de $0$.`;
|
|
17
|
+
};
|
|
18
|
+
const getCorrection = () => {
|
|
19
|
+
return `Pour $a$ différent de $0$, on a
|
|
20
|
+
|
|
21
|
+
$$
|
|
22
|
+
\\frac{x}{a} = \\frac{1}{a}\\times x
|
|
23
|
+
$$
|
|
24
|
+
|
|
25
|
+
Par conséquent, les deux fonctions sont les mêmes donc les courbes tracées sont les mêmes.`;
|
|
26
|
+
};
|
|
27
|
+
const getPropositions = () => {
|
|
28
|
+
const propositions = [];
|
|
29
|
+
addValidProp(propositions, "Les deux courbes tracées sont les mêmes.", "raw");
|
|
30
|
+
tryToAddWrongProp(propositions, "La courbe de Paul est au dessus de celle de Virginie.", "raw");
|
|
31
|
+
tryToAddWrongProp(propositions, "La courbe de Paul est en dessous de celle de Virginie.", "raw");
|
|
32
|
+
tryToAddWrongProp(propositions, "La courbe de Paul est au dessus de celle de Virginie pour $x<0$ puis c'est l’inverse pour $x>0$.", "raw");
|
|
33
|
+
return propositions;
|
|
34
|
+
};
|
|
35
|
+
const getCompareFracXAQuestion = () => {
|
|
36
|
+
const a = randint(1, 100);
|
|
37
|
+
const nodes = [frac("x", a), multiply(frac(1, a), "x")];
|
|
38
|
+
return getQuestionFromIdentifiers({
|
|
39
|
+
nodeIds: nodes.map((node) => node.toIdentifiers()),
|
|
40
|
+
});
|
|
41
|
+
};
|
|
42
|
+
const getQuestionFromIdentifiers = (identifiers, opts) => {
|
|
43
|
+
const question = {
|
|
44
|
+
instruction: getInstruction(identifiers),
|
|
45
|
+
keys: [],
|
|
46
|
+
answerFormat: "tex",
|
|
47
|
+
identifiers,
|
|
48
|
+
hint: getHint(identifiers),
|
|
49
|
+
correction: getCorrection(identifiers),
|
|
50
|
+
options: opts,
|
|
51
|
+
};
|
|
52
|
+
return question;
|
|
53
|
+
};
|
|
54
|
+
export const compareFracXA = {
|
|
55
|
+
id: "compareFracXA",
|
|
56
|
+
label: "Tracé des courbes $\\frac{x}{a} = \\frac{1}{a} \\times x$ pour $a$ non nul",
|
|
57
|
+
isSingleStep: true,
|
|
58
|
+
generator: (nb, opts) => getDistinctQuestions(() => getCompareFracXAQuestion(opts), nb, 30),
|
|
59
|
+
qcmTimer: 60,
|
|
60
|
+
freeTimer: 60,
|
|
61
|
+
getPropositions,
|
|
62
|
+
subject: "Mathématiques",
|
|
63
|
+
maxAllowedQuestions: 30,
|
|
64
|
+
getQuestionFromIdentifiers,
|
|
65
|
+
answerType: "QCU",
|
|
66
|
+
hasHintAndCorrection: true,
|
|
67
|
+
};
|
|
@@ -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 compareMinusA: Exercise<Identifiers>;
|
|
10
|
+
export {};
|
|
11
|
+
//# sourceMappingURL=compareMinusA.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"compareMinusA.d.ts","sourceRoot":"","sources":["../../../../../src/exercises/math/calculLitteral/simplifying/compareMinusA.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;AAkHF,eAAO,MAAM,aAAa,EAAE,QAAQ,CAAC,WAAW,CAe/C,CAAC"}
|
|
@@ -0,0 +1,114 @@
|
|
|
1
|
+
import { addValidProp, tryToAddWrongProp, } from "../../../../exercises/exercise.js";
|
|
2
|
+
import { getDistinctQuestions } from "../../../../exercises/utils/getDistinctQuestions.js";
|
|
3
|
+
import { probaLawFlip } from "../../../../utils/alea/probaLawFlip.js";
|
|
4
|
+
import { shuffle } from "../../../../utils/alea/shuffle.js";
|
|
5
|
+
import { permute } from "../../../../utils/arrays/permutations.js";
|
|
6
|
+
const getInstruction = () => {
|
|
7
|
+
return `Soit a un nombre non nul.
|
|
8
|
+
|
|
9
|
+
Parmi les propositions suivantes, lesquelles sont vraies ?`;
|
|
10
|
+
};
|
|
11
|
+
const getHint = () => {
|
|
12
|
+
return "La règle des signes est la même pour une multiplication et pour une division.";
|
|
13
|
+
};
|
|
14
|
+
const getCorrection = () => {
|
|
15
|
+
return `
|
|
16
|
+
|
|
17
|
+
$$
|
|
18
|
+
(−1) \\times a = -a
|
|
19
|
+
$$
|
|
20
|
+
|
|
21
|
+
et
|
|
22
|
+
|
|
23
|
+
$$
|
|
24
|
+
\\frac{a}{-1} = -a
|
|
25
|
+
$$
|
|
26
|
+
|
|
27
|
+
donc
|
|
28
|
+
|
|
29
|
+
$$
|
|
30
|
+
(−1) \\times a = \\frac{a}{-1} = -a
|
|
31
|
+
$$
|
|
32
|
+
|
|
33
|
+
`;
|
|
34
|
+
};
|
|
35
|
+
const getPropositions = (_, { answer, ...identifiers }) => {
|
|
36
|
+
const { items } = identifiers;
|
|
37
|
+
const propositions = [];
|
|
38
|
+
items.forEach((item) => {
|
|
39
|
+
if (item.isValidAnswer) {
|
|
40
|
+
addValidProp(propositions, item.tex, "raw");
|
|
41
|
+
}
|
|
42
|
+
else {
|
|
43
|
+
tryToAddWrongProp(propositions, item.tex, "raw");
|
|
44
|
+
}
|
|
45
|
+
});
|
|
46
|
+
return propositions;
|
|
47
|
+
};
|
|
48
|
+
const getCompareMinusAQuestion = () => {
|
|
49
|
+
const nbTotal = 4;
|
|
50
|
+
const nbValid = probaLawFlip([
|
|
51
|
+
[1, 0.5],
|
|
52
|
+
[2, 0.45],
|
|
53
|
+
[3, 0.03],
|
|
54
|
+
[4, 0.02],
|
|
55
|
+
]);
|
|
56
|
+
const nbInvalid = nbTotal - nbValid;
|
|
57
|
+
const arrayOfTex = [`(−1) \\times a`, `\\frac{a}{-1}`, `-a`];
|
|
58
|
+
const permutations = permute(arrayOfTex);
|
|
59
|
+
const validItems = permutations.flatMap(([tex1, tex2, tex3]) => {
|
|
60
|
+
return [
|
|
61
|
+
`$${[tex1, tex2, tex3].join("=")}$`,
|
|
62
|
+
`$${tex1}=${tex2}$ et $${tex2}=${tex3}$`,
|
|
63
|
+
].map((tex) => {
|
|
64
|
+
return {
|
|
65
|
+
tex,
|
|
66
|
+
isValidAnswer: true,
|
|
67
|
+
};
|
|
68
|
+
});
|
|
69
|
+
});
|
|
70
|
+
const invalidItems = permutations.flatMap(([tex1, tex2, tex3]) => {
|
|
71
|
+
return [
|
|
72
|
+
`$${tex1}>${tex2}$ et $${tex2}=${tex3}$`,
|
|
73
|
+
`$${tex1}<${tex2}$ et $${tex2}=${tex3}$`,
|
|
74
|
+
`$${tex1}=${tex2}$ et $${tex2}>${tex3}$`,
|
|
75
|
+
`$${tex1}=${tex2}$ et $${tex2}<${tex3}$`,
|
|
76
|
+
].map((tex) => {
|
|
77
|
+
return {
|
|
78
|
+
tex,
|
|
79
|
+
isValidAnswer: false,
|
|
80
|
+
};
|
|
81
|
+
});
|
|
82
|
+
});
|
|
83
|
+
const items = shuffle([
|
|
84
|
+
...shuffle(validItems).slice(0, nbValid),
|
|
85
|
+
...shuffle(invalidItems).slice(0, nbInvalid),
|
|
86
|
+
]);
|
|
87
|
+
return getQuestionFromIdentifiers({ items });
|
|
88
|
+
};
|
|
89
|
+
const getQuestionFromIdentifiers = (identifiers) => {
|
|
90
|
+
const question = {
|
|
91
|
+
instruction: getInstruction(identifiers),
|
|
92
|
+
keys: [],
|
|
93
|
+
answerFormat: "tex",
|
|
94
|
+
identifiers,
|
|
95
|
+
hint: getHint(identifiers),
|
|
96
|
+
correction: getCorrection(identifiers),
|
|
97
|
+
};
|
|
98
|
+
return question;
|
|
99
|
+
};
|
|
100
|
+
export const compareMinusA = {
|
|
101
|
+
id: "compareMinusA",
|
|
102
|
+
label: "Comparer $(−1) \\times a$ ; $\\frac{a}{-1}$ et $-a$",
|
|
103
|
+
isSingleStep: true,
|
|
104
|
+
generator: (nb) => getDistinctQuestions(() => getCompareMinusAQuestion(), nb, 30),
|
|
105
|
+
qcmTimer: 60,
|
|
106
|
+
freeTimer: 60,
|
|
107
|
+
getPropositions,
|
|
108
|
+
subject: "Mathématiques",
|
|
109
|
+
maxAllowedQuestions: 30,
|
|
110
|
+
getQuestionFromIdentifiers,
|
|
111
|
+
answerType: "QCM",
|
|
112
|
+
isQCM: true,
|
|
113
|
+
hasHintAndCorrection: true,
|
|
114
|
+
};
|
|
@@ -2,4 +2,9 @@ export * from "./evaluateExpression.js";
|
|
|
2
2
|
export * from "./reduceExpression.js";
|
|
3
3
|
export * from "./distributeAndSimplify.js";
|
|
4
4
|
export * from "./valuateExpression.js";
|
|
5
|
+
export * from "./pickSameAsAPercentOfB.js";
|
|
6
|
+
export * from "./compareMinusA.js";
|
|
7
|
+
export * from "./pickSameAsInverseOfFracAB.js";
|
|
8
|
+
export * from "./compareATimes0.js";
|
|
9
|
+
export * from "./compareFracXA.js";
|
|
5
10
|
//# sourceMappingURL=index.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../../src/exercises/math/calculLitteral/simplifying/index.ts"],"names":[],"mappings":"AAAA,cAAc,yBAAyB,CAAC;AACxC,cAAc,uBAAuB,CAAC;AACtC,cAAc,4BAA4B,CAAC;AAC3C,cAAc,wBAAwB,CAAC"}
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../../src/exercises/math/calculLitteral/simplifying/index.ts"],"names":[],"mappings":"AAAA,cAAc,yBAAyB,CAAC;AACxC,cAAc,uBAAuB,CAAC;AACtC,cAAc,4BAA4B,CAAC;AAC3C,cAAc,wBAAwB,CAAC;AACvC,cAAc,4BAA4B,CAAC;AAC3C,cAAc,oBAAoB,CAAC;AACnC,cAAc,gCAAgC,CAAC;AAC/C,cAAc,qBAAqB,CAAC;AACpC,cAAc,oBAAoB,CAAC"}
|
|
@@ -2,3 +2,8 @@ export * from "./evaluateExpression.js";
|
|
|
2
2
|
export * from "./reduceExpression.js";
|
|
3
3
|
export * from "./distributeAndSimplify.js";
|
|
4
4
|
export * from "./valuateExpression.js";
|
|
5
|
+
export * from "./pickSameAsAPercentOfB.js";
|
|
6
|
+
export * from "./compareMinusA.js";
|
|
7
|
+
export * from "./pickSameAsInverseOfFracAB.js";
|
|
8
|
+
export * from "./compareATimes0.js";
|
|
9
|
+
export * from "./compareFracXA.js";
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
import { Exercise } from "../../../../exercises/exercise.js";
|
|
2
|
+
type Item = {
|
|
3
|
+
tex: string;
|
|
4
|
+
isValidAnswer: boolean;
|
|
5
|
+
};
|
|
6
|
+
type Identifiers = {
|
|
7
|
+
a: number;
|
|
8
|
+
b: number;
|
|
9
|
+
items: Item[];
|
|
10
|
+
};
|
|
11
|
+
export declare const pickSameAsAPercentOfB: Exercise<Identifiers>;
|
|
12
|
+
export {};
|
|
13
|
+
//# sourceMappingURL=pickSameAsAPercentOfB.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"pickSameAsAPercentOfB.d.ts","sourceRoot":"","sources":["../../../../../src/exercises/math/calculLitteral/simplifying/pickSameAsAPercentOfB.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,QAAQ,EAWT,MAAM,6BAA6B,CAAC;AAOrC,KAAK,IAAI,GAAG;IACV,GAAG,EAAE,MAAM,CAAC;IACZ,aAAa,EAAE,OAAO,CAAC;CACxB,CAAC;AAEF,KAAK,WAAW,GAAG;IACjB,CAAC,EAAE,MAAM,CAAC;IACV,CAAC,EAAE,MAAM,CAAC;IACV,KAAK,EAAE,IAAI,EAAE,CAAC;CACf,CAAC;AA+IF,eAAO,MAAM,qBAAqB,EAAE,QAAQ,CAAC,WAAW,CAgBvD,CAAC"}
|
|
@@ -0,0 +1,125 @@
|
|
|
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 { probaLawFlip } from "../../../../utils/alea/probaLawFlip.js";
|
|
5
|
+
import { random } from "../../../../utils/alea/random.js";
|
|
6
|
+
import { shuffle } from "../../../../utils/alea/shuffle.js";
|
|
7
|
+
const getInstruction = (identifiers) => {
|
|
8
|
+
const { a, b } = identifiers;
|
|
9
|
+
return `Quelles sont la ou les propositions qui sont égales à $${a}\\%$ de $${b}$ ?`;
|
|
10
|
+
};
|
|
11
|
+
const getHint = (identifiers) => {
|
|
12
|
+
const { a } = identifiers;
|
|
13
|
+
return `$${a}\\%$ signifie $\\frac{${a}}{100}$.`;
|
|
14
|
+
};
|
|
15
|
+
const getCorrection = (identifiers) => {
|
|
16
|
+
const { a, b } = identifiers;
|
|
17
|
+
return `Pour calculer $${a}\\%$ de $${b}$, on calcule $\\frac{${a}}{100}\\times ${b}$.
|
|
18
|
+
|
|
19
|
+
$$
|
|
20
|
+
\\frac{${a}}{100} \\times ${b} = \\frac{${a} \\times ${b}}{100} = ${a} \\times \\frac{${b}}{100}
|
|
21
|
+
$$
|
|
22
|
+
|
|
23
|
+
On peut aussi multiplier par $0,01$, au lieu de diviser par $100$.
|
|
24
|
+
|
|
25
|
+
$$
|
|
26
|
+
\\frac{${a}}{100} \\times ${b} = (${a} \\times 0,01) \\times ${b}
|
|
27
|
+
$$
|
|
28
|
+
|
|
29
|
+
`;
|
|
30
|
+
};
|
|
31
|
+
const getPropositions = (_, { answer, ...identifiers }) => {
|
|
32
|
+
const { items } = identifiers;
|
|
33
|
+
const propositions = [];
|
|
34
|
+
items.forEach((item) => {
|
|
35
|
+
if (item.isValidAnswer) {
|
|
36
|
+
addValidProp(propositions, item.tex, "tex");
|
|
37
|
+
}
|
|
38
|
+
else {
|
|
39
|
+
tryToAddWrongProp(propositions, item.tex, "tex");
|
|
40
|
+
}
|
|
41
|
+
});
|
|
42
|
+
return propositions;
|
|
43
|
+
};
|
|
44
|
+
const getPickSameAsAPercentOfBQuestion = () => {
|
|
45
|
+
const a = randint(0, 100, [0]);
|
|
46
|
+
const b = random([20, 30, 40, 50, 60, 80, 90, 120, 130, 140, 150]);
|
|
47
|
+
const nbTotal = 4;
|
|
48
|
+
const nbValid = probaLawFlip([
|
|
49
|
+
[1, 0.5],
|
|
50
|
+
[2, 0.45],
|
|
51
|
+
[3, 0.03],
|
|
52
|
+
[4, 0.02],
|
|
53
|
+
]);
|
|
54
|
+
const nbInvalid = nbTotal - nbValid;
|
|
55
|
+
const validItems = [
|
|
56
|
+
...new Set([
|
|
57
|
+
`\\frac{a}{100} \\times {b}`,
|
|
58
|
+
`{b} \\times \\frac{a}{100}`,
|
|
59
|
+
`\\frac{{a} \\times {b}}{100}`,
|
|
60
|
+
`\\frac{{b} \\times {a}}{100}`,
|
|
61
|
+
`{a} \\times \\frac{b}{100}`,
|
|
62
|
+
`\\frac{b}{100} \\times {a}`,
|
|
63
|
+
`({a} \\times 0,01) \\times {b}`,
|
|
64
|
+
`({a} \\times {b}) \\times 0,01`,
|
|
65
|
+
`{a} \\times ({b} \\times 0,01)`,
|
|
66
|
+
].map((tex) => tex.replaceAll("{a}", `{${a}}`).replaceAll("{b}", `{${b}}`))).values(),
|
|
67
|
+
].map((tex) => {
|
|
68
|
+
return {
|
|
69
|
+
tex,
|
|
70
|
+
isValidAnswer: true,
|
|
71
|
+
};
|
|
72
|
+
});
|
|
73
|
+
const invalidItems = [
|
|
74
|
+
...new Set([
|
|
75
|
+
`\\frac{100}{a} \\times {b}`,
|
|
76
|
+
`{b} \\times \\frac{100}{a}`,
|
|
77
|
+
`{a} \\times {b} \\times 100`,
|
|
78
|
+
`{a} \\times 100 \\times {b}`,
|
|
79
|
+
`{a} \\times \\frac{100}{b}`,
|
|
80
|
+
`\\frac{100}{b} \\times {a}`,
|
|
81
|
+
`0,01 \\times {a} \\times {b} \\times 0,01`,
|
|
82
|
+
`0,01 \\times {a} \\times 0,01 \\times {b}`,
|
|
83
|
+
`\\frac{a}{100} \\times 0,01 \\times {b}`,
|
|
84
|
+
`\\frac{0,01 \\times {a} }{b}`,
|
|
85
|
+
`\\frac{0,01 \\times {b} }{a}`,
|
|
86
|
+
`\\frac{a}{0,01} \\times {b}`,
|
|
87
|
+
].map((tex) => tex.replaceAll("{a}", `{${a}}`).replaceAll("{b}", `{${b}}`))).values(),
|
|
88
|
+
].map((tex) => {
|
|
89
|
+
return {
|
|
90
|
+
tex,
|
|
91
|
+
isValidAnswer: false,
|
|
92
|
+
};
|
|
93
|
+
});
|
|
94
|
+
const items = shuffle([
|
|
95
|
+
...shuffle(validItems).slice(0, nbValid),
|
|
96
|
+
...shuffle(invalidItems).slice(0, nbInvalid),
|
|
97
|
+
]);
|
|
98
|
+
return getQuestionFromIdentifiers({ a, b, items });
|
|
99
|
+
};
|
|
100
|
+
const getQuestionFromIdentifiers = (identifiers) => {
|
|
101
|
+
const question = {
|
|
102
|
+
instruction: getInstruction(identifiers),
|
|
103
|
+
keys: [],
|
|
104
|
+
answerFormat: "tex",
|
|
105
|
+
identifiers,
|
|
106
|
+
hint: getHint(identifiers),
|
|
107
|
+
correction: getCorrection(identifiers),
|
|
108
|
+
};
|
|
109
|
+
return question;
|
|
110
|
+
};
|
|
111
|
+
export const pickSameAsAPercentOfB = {
|
|
112
|
+
id: "pickSameAsAPercentOfB",
|
|
113
|
+
label: "Utiliser $\\frac{ab}{c} = a \\times \\frac{b}{c} = \\frac{a}{c} \\times b$ pour calculer des pourcentages",
|
|
114
|
+
isSingleStep: true,
|
|
115
|
+
generator: (nb) => getDistinctQuestions(() => getPickSameAsAPercentOfBQuestion(), nb, 30),
|
|
116
|
+
qcmTimer: 60,
|
|
117
|
+
freeTimer: 60,
|
|
118
|
+
getPropositions,
|
|
119
|
+
subject: "Mathématiques",
|
|
120
|
+
maxAllowedQuestions: 30,
|
|
121
|
+
getQuestionFromIdentifiers,
|
|
122
|
+
answerType: "QCM",
|
|
123
|
+
isQCM: true,
|
|
124
|
+
hasHintAndCorrection: true,
|
|
125
|
+
};
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
import { Exercise } from "../../../../exercises/exercise.js";
|
|
2
|
+
type Item = {
|
|
3
|
+
tex: string;
|
|
4
|
+
isValidAnswer: boolean;
|
|
5
|
+
};
|
|
6
|
+
type Identifiers = {
|
|
7
|
+
a: number;
|
|
8
|
+
b: number;
|
|
9
|
+
items: Item[];
|
|
10
|
+
};
|
|
11
|
+
export declare const pickSameAsInverseOfFracAB: Exercise<Identifiers>;
|
|
12
|
+
export declare const pickSameAsInverseOfFrac1A: Exercise<Identifiers>;
|
|
13
|
+
export {};
|
|
14
|
+
//# sourceMappingURL=pickSameAsInverseOfFracAB.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"pickSameAsInverseOfFracAB.d.ts","sourceRoot":"","sources":["../../../../../src/exercises/math/calculLitteral/simplifying/pickSameAsInverseOfFracAB.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,QAAQ,EAWT,MAAM,6BAA6B,CAAC;AAQrC,KAAK,IAAI,GAAG;IACV,GAAG,EAAE,MAAM,CAAC;IACZ,aAAa,EAAE,OAAO,CAAC;CACxB,CAAC;AAEF,KAAK,WAAW,GAAG;IACjB,CAAC,EAAE,MAAM,CAAC;IACV,CAAC,EAAE,MAAM,CAAC;IACV,KAAK,EAAE,IAAI,EAAE,CAAC;CACf,CAAC;AAqJF,eAAO,MAAM,yBAAyB,EAAE,QAAQ,CAAC,WAAW,CAe3D,CAAC;AAEF,eAAO,MAAM,yBAAyB,EAAE,QAAQ,CAAC,WAAW,CAe3D,CAAC"}
|
|
@@ -0,0 +1,148 @@
|
|
|
1
|
+
import { addValidProp, tryToAddWrongProp, } from "../../../../exercises/exercise.js";
|
|
2
|
+
import { getDistinctQuestions } from "../../../../exercises/utils/getDistinctQuestions.js";
|
|
3
|
+
import { primes } from "../../../../math/numbers/integer/primes.js";
|
|
4
|
+
import { randint } from "../../../../math/utils/random/randint.js";
|
|
5
|
+
import { probaLawFlip } from "../../../../utils/alea/probaLawFlip.js";
|
|
6
|
+
import { random } from "../../../../utils/alea/random.js";
|
|
7
|
+
import { shuffle } from "../../../../utils/alea/shuffle.js";
|
|
8
|
+
const getInstruction = (identifiers) => {
|
|
9
|
+
const { a, b } = identifiers;
|
|
10
|
+
return `Parmi ces propositions, laquelle ou lesquelles sont égales à $\\frac{1}{\\frac{${a}}{${b}}}$ ?`;
|
|
11
|
+
};
|
|
12
|
+
const getHint = () => {
|
|
13
|
+
return "Diviser par un nombre c'est multiplier par son inverse.";
|
|
14
|
+
};
|
|
15
|
+
const getCorrection = (identifiers) => {
|
|
16
|
+
const { a, b } = identifiers;
|
|
17
|
+
return `Ici $1$ est divisé par $\\frac{${a}}{${b}}$.
|
|
18
|
+
|
|
19
|
+
Or diviser par un nombre, c'est multiplier par son inverse.
|
|
20
|
+
|
|
21
|
+
$1$ est donc multiplié par $\\frac{${b}}{${a}}$,
|
|
22
|
+
|
|
23
|
+
ce qui donne $\\frac{${b}}{${a}}$${a === 1 ? `, c'est à dire par $${b}$.` : `.`}`;
|
|
24
|
+
};
|
|
25
|
+
const getPropositions = (_, { answer, ...identifiers }) => {
|
|
26
|
+
const { items } = identifiers;
|
|
27
|
+
const propositions = [];
|
|
28
|
+
items.forEach((item) => {
|
|
29
|
+
if (item.isValidAnswer) {
|
|
30
|
+
addValidProp(propositions, item.tex, "tex");
|
|
31
|
+
}
|
|
32
|
+
else {
|
|
33
|
+
tryToAddWrongProp(propositions, item.tex, "tex");
|
|
34
|
+
}
|
|
35
|
+
});
|
|
36
|
+
return propositions;
|
|
37
|
+
};
|
|
38
|
+
const getPickSameAsInverseOfFracABQuestion = () => {
|
|
39
|
+
const p = random(primes);
|
|
40
|
+
const [a, b] = shuffle([p, randint(0, p, [0])]);
|
|
41
|
+
const nbTotal = 4;
|
|
42
|
+
const nbValid = probaLawFlip([
|
|
43
|
+
[1, 0.5],
|
|
44
|
+
[2, 0.45],
|
|
45
|
+
[3, 0.05],
|
|
46
|
+
]);
|
|
47
|
+
const nbInvalid = nbTotal - nbValid;
|
|
48
|
+
const validItems = [
|
|
49
|
+
`\\frac{b}{a}`,
|
|
50
|
+
`{b} \\times \\frac{1}{a}`,
|
|
51
|
+
`\\frac{1}{a} \\times {b}`,
|
|
52
|
+
].map((tex) => {
|
|
53
|
+
return {
|
|
54
|
+
tex: tex.replaceAll("{a}", `{${a}}`).replaceAll("{b}", `{${b}}`),
|
|
55
|
+
isValidAnswer: true,
|
|
56
|
+
};
|
|
57
|
+
});
|
|
58
|
+
const invalidItems = [
|
|
59
|
+
`\\frac{a}{b}`,
|
|
60
|
+
`{a} \\times \\frac{1}{b}`,
|
|
61
|
+
`\\frac{1}{b} \\times {a}`,
|
|
62
|
+
`\\frac{1}{ {b} \\times {a} } `,
|
|
63
|
+
`\\frac{1}{ {a} \\times {b} } `,
|
|
64
|
+
`{a} + {b}`,
|
|
65
|
+
`{b} + {a}`,
|
|
66
|
+
`{a} \\times {b}`,
|
|
67
|
+
`{b} \\times {a}`,
|
|
68
|
+
].map((tex) => {
|
|
69
|
+
return {
|
|
70
|
+
tex: tex.replaceAll("{a}", `{${a}}`).replaceAll("{b}", `{${b}}`),
|
|
71
|
+
isValidAnswer: false,
|
|
72
|
+
};
|
|
73
|
+
});
|
|
74
|
+
const items = shuffle([
|
|
75
|
+
validItems[0],
|
|
76
|
+
...shuffle(validItems.slice(1)).slice(0, nbValid - 1),
|
|
77
|
+
...shuffle(invalidItems).slice(0, nbInvalid),
|
|
78
|
+
]);
|
|
79
|
+
return getQuestionFromIdentifiers({ a, b, items });
|
|
80
|
+
};
|
|
81
|
+
const getPickSameAsInverseOfFrac1AQuestion = () => {
|
|
82
|
+
const [a, b] = [1, randint(2, 107)];
|
|
83
|
+
const nbTotal = 4;
|
|
84
|
+
const nbValid = probaLawFlip([
|
|
85
|
+
[1, 0.8],
|
|
86
|
+
[2, 0.2],
|
|
87
|
+
]);
|
|
88
|
+
const nbInvalid = nbTotal - nbValid;
|
|
89
|
+
const validItems = [`{b}`, `\\frac{b}{1}`].map((tex) => {
|
|
90
|
+
return {
|
|
91
|
+
tex: tex.replaceAll("{b}", `{${b}}`),
|
|
92
|
+
isValidAnswer: true,
|
|
93
|
+
};
|
|
94
|
+
});
|
|
95
|
+
const invalidItems = [`\\frac{1}{b}`, `{b} + 1`, `1`].map((tex) => {
|
|
96
|
+
return {
|
|
97
|
+
tex: tex.replaceAll("{b}", `{${b}}`),
|
|
98
|
+
isValidAnswer: false,
|
|
99
|
+
};
|
|
100
|
+
});
|
|
101
|
+
const items = shuffle([
|
|
102
|
+
validItems[0],
|
|
103
|
+
...shuffle(validItems.slice(1)).slice(0, nbValid - 1),
|
|
104
|
+
...shuffle(invalidItems).slice(0, nbInvalid),
|
|
105
|
+
]);
|
|
106
|
+
return getQuestionFromIdentifiers({ a, b, items });
|
|
107
|
+
};
|
|
108
|
+
const getQuestionFromIdentifiers = (identifiers) => {
|
|
109
|
+
const question = {
|
|
110
|
+
instruction: getInstruction(identifiers),
|
|
111
|
+
keys: [],
|
|
112
|
+
answerFormat: "tex",
|
|
113
|
+
identifiers,
|
|
114
|
+
hint: getHint(identifiers),
|
|
115
|
+
correction: getCorrection(identifiers),
|
|
116
|
+
};
|
|
117
|
+
return question;
|
|
118
|
+
};
|
|
119
|
+
export const pickSameAsInverseOfFracAB = {
|
|
120
|
+
id: "pickSameAsInverseOfFracAB",
|
|
121
|
+
label: "Calculer $\\frac{1}{\\frac{a}{b}}$",
|
|
122
|
+
isSingleStep: true,
|
|
123
|
+
generator: (nb) => getDistinctQuestions(() => getPickSameAsInverseOfFracABQuestion(), nb, 30),
|
|
124
|
+
qcmTimer: 60,
|
|
125
|
+
freeTimer: 60,
|
|
126
|
+
getPropositions,
|
|
127
|
+
subject: "Mathématiques",
|
|
128
|
+
maxAllowedQuestions: 30,
|
|
129
|
+
getQuestionFromIdentifiers,
|
|
130
|
+
answerType: "QCM",
|
|
131
|
+
isQCM: true,
|
|
132
|
+
hasHintAndCorrection: true,
|
|
133
|
+
};
|
|
134
|
+
export const pickSameAsInverseOfFrac1A = {
|
|
135
|
+
id: "pickSameAsInverseOfFrac1A",
|
|
136
|
+
label: "Calculer $\\frac{1}{\\frac{1}{a}}$",
|
|
137
|
+
isSingleStep: true,
|
|
138
|
+
generator: (nb) => getDistinctQuestions(() => getPickSameAsInverseOfFrac1AQuestion(), nb, 30),
|
|
139
|
+
qcmTimer: 60,
|
|
140
|
+
freeTimer: 60,
|
|
141
|
+
getPropositions,
|
|
142
|
+
subject: "Mathématiques",
|
|
143
|
+
maxAllowedQuestions: 30,
|
|
144
|
+
getQuestionFromIdentifiers,
|
|
145
|
+
answerType: "QCM",
|
|
146
|
+
isQCM: true,
|
|
147
|
+
hasHintAndCorrection: true,
|
|
148
|
+
};
|