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,90 @@
|
|
|
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 { coinFlip } from "../../../../utils/alea/coinFlip.js";
|
|
5
|
+
import { randomMany } from "../../../../utils/alea/random.js";
|
|
6
|
+
const getInstruction = (identifiers) => {
|
|
7
|
+
const { dictNameForSerie, isLess } = identifiers;
|
|
8
|
+
const series = Object.entries(dictNameForSerie);
|
|
9
|
+
return `On considère les séries suivantes :
|
|
10
|
+
|
|
11
|
+
${series.map(([name, values]) => {
|
|
12
|
+
return `Série ${name} : ${values
|
|
13
|
+
.map((value) => `$${value.frenchify()}$`)
|
|
14
|
+
.join(" ; ")}`;
|
|
15
|
+
}).join(`
|
|
16
|
+
|
|
17
|
+
`)}
|
|
18
|
+
|
|
19
|
+
Quelle série a l'écart-type le plus ${isLess ? `petit` : `grand`} ?`;
|
|
20
|
+
};
|
|
21
|
+
const getPropositions = (_, { answer, ...identifiers }) => {
|
|
22
|
+
const { dictNameForSerie, answerName } = identifiers;
|
|
23
|
+
const propositions = [];
|
|
24
|
+
addValidProp(propositions, `la série $${answerName}$`, "raw");
|
|
25
|
+
Object.keys(dictNameForSerie)
|
|
26
|
+
.toSorted((name1, name2) => name1.localeCompare(name2))
|
|
27
|
+
.forEach((name) => {
|
|
28
|
+
tryToAddWrongProp(propositions, `la série $${name}$`, "raw");
|
|
29
|
+
});
|
|
30
|
+
tryToAddWrongProp(propositions, `aucune des deux car leurs écart-type sont égaux`, "raw");
|
|
31
|
+
return propositions;
|
|
32
|
+
};
|
|
33
|
+
const getHint = () => {
|
|
34
|
+
return `L'écart-type est un indicateur de dispersion.
|
|
35
|
+
Plus il est important, plus les valeurs sont éparpillées.
|
|
36
|
+
Plus il est petit, plus les valeurs sont regroupées autour de la moyenne.`;
|
|
37
|
+
};
|
|
38
|
+
const getCorrection = (identifiers) => {
|
|
39
|
+
const { answerName, isLess } = identifiers;
|
|
40
|
+
const wrongName = answerName === "A" ? "B" : "A";
|
|
41
|
+
return `Ici les deux séries ont une moyenne de $10$
|
|
42
|
+
mais les valeurs de la série $${answerName}$ sont ${isLess ? `moins` : `plus`} éparpillées autour de $10$ que les valeurs de la série $${wrongName}$.
|
|
43
|
+
Ainsi la série $${answerName}$ a l'écart-type le plus ${isLess ? `petit` : `grand`}.`;
|
|
44
|
+
};
|
|
45
|
+
const getInterpretIndicatorsForListsQuestion = () => {
|
|
46
|
+
const a = randint(1, 4);
|
|
47
|
+
const b = randint(2, 5) * a;
|
|
48
|
+
const series = [
|
|
49
|
+
[10 - a, 10, 10, 10 + a],
|
|
50
|
+
[10 - b, 10, 10, 10 + b],
|
|
51
|
+
];
|
|
52
|
+
const isLess = coinFlip();
|
|
53
|
+
const answerIndexUnshuffled = isLess ? 0 : 1;
|
|
54
|
+
const shuffleArray = randomMany([...Array(series.length).keys()], series.length);
|
|
55
|
+
const shuffledSeries = shuffleArray.map((i) => series[i]);
|
|
56
|
+
const answerIndexShuffled = shuffleArray.indexOf(answerIndexUnshuffled);
|
|
57
|
+
const names = ["A", "B"];
|
|
58
|
+
const dictNameForSerie = Object.fromEntries(names.map((name, i) => [name, shuffledSeries[i]]));
|
|
59
|
+
const answerName = names[answerIndexShuffled];
|
|
60
|
+
return getQuestionFromIdentifiers({
|
|
61
|
+
dictNameForSerie,
|
|
62
|
+
answerName,
|
|
63
|
+
isLess,
|
|
64
|
+
});
|
|
65
|
+
};
|
|
66
|
+
const getQuestionFromIdentifiers = (identifiers) => {
|
|
67
|
+
const question = {
|
|
68
|
+
instruction: getInstruction(identifiers),
|
|
69
|
+
keys: [],
|
|
70
|
+
answerFormat: "tex",
|
|
71
|
+
identifiers,
|
|
72
|
+
hint: getHint(identifiers),
|
|
73
|
+
correction: getCorrection(identifiers),
|
|
74
|
+
};
|
|
75
|
+
return question;
|
|
76
|
+
};
|
|
77
|
+
export const interpretIndicatorsForLists = {
|
|
78
|
+
id: "interpretIndicatorsForLists",
|
|
79
|
+
label: "Interpréter des indicateurs statistiques pour une série statistique",
|
|
80
|
+
isSingleStep: true,
|
|
81
|
+
generator: (nb, opts) => getDistinctQuestions(() => getInterpretIndicatorsForListsQuestion(opts), nb),
|
|
82
|
+
qcmTimer: 60,
|
|
83
|
+
freeTimer: 60,
|
|
84
|
+
getPropositions,
|
|
85
|
+
hasHintAndCorrection: true,
|
|
86
|
+
subject: "Mathématiques",
|
|
87
|
+
getQuestionFromIdentifiers,
|
|
88
|
+
answerType: "QCM",
|
|
89
|
+
isQCM: true,
|
|
90
|
+
};
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
import { Exercise } from "../../../../exercises/exercise.js";
|
|
2
|
+
type Identifiers = {
|
|
3
|
+
a: number;
|
|
4
|
+
values: number[];
|
|
5
|
+
isAboveA: boolean;
|
|
6
|
+
isQuestionIsAboveA: boolean;
|
|
7
|
+
};
|
|
8
|
+
export declare const plausibilityOfAverage: Exercise<Identifiers>;
|
|
9
|
+
export {};
|
|
10
|
+
//# sourceMappingURL=plausibilityOfAverage.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"plausibilityOfAverage.d.ts","sourceRoot":"","sources":["../../../../../src/exercises/math/probaStat/stats1var/plausibilityOfAverage.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,QAAQ,EAYT,MAAM,6BAA6B,CAAC;AAMrC,KAAK,WAAW,GAAG;IACjB,CAAC,EAAE,MAAM,CAAC;IACV,MAAM,EAAE,MAAM,EAAE,CAAC;IACjB,QAAQ,EAAE,OAAO,CAAC;IAClB,kBAAkB,EAAE,OAAO,CAAC;CAC7B,CAAC;AAyKF,eAAO,MAAM,qBAAqB,EAAE,QAAQ,CAAC,WAAW,CAkBvD,CAAC"}
|
|
@@ -0,0 +1,151 @@
|
|
|
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 { coinFlip } from "../../../../utils/alea/coinFlip.js";
|
|
5
|
+
import { random } from "../../../../utils/alea/random.js";
|
|
6
|
+
const getInstruction = (identifiers) => {
|
|
7
|
+
const { a, values, isQuestionIsAboveA } = identifiers;
|
|
8
|
+
return `Si on considère la série suivante :
|
|
9
|
+
|
|
10
|
+
$$
|
|
11
|
+
${values.map((v) => v.frenchify()).join(" ; ")}
|
|
12
|
+
$$
|
|
13
|
+
|
|
14
|
+
La proposition suivante est-elle vraie ?
|
|
15
|
+
|
|
16
|
+
"La moyenne de cette série est strictement ${isQuestionIsAboveA ? `supérieure` : `inférieure`} à $${a.frenchify()}$."
|
|
17
|
+
`;
|
|
18
|
+
};
|
|
19
|
+
const getHint = ({ a }) => {
|
|
20
|
+
return `Regarder l'écart des valeurs par rapport à $${a.frenchify()}$.`;
|
|
21
|
+
};
|
|
22
|
+
const getCorrection = (identifiers) => {
|
|
23
|
+
const { a, values, isAboveA } = identifiers;
|
|
24
|
+
const answer = getAnswer(identifiers);
|
|
25
|
+
const valuesBelowA = values.filter((v) => v < a);
|
|
26
|
+
const valuesAboveA = values.filter((v) => v > a);
|
|
27
|
+
return `${answer}, car si l'on regarde les valeurs strictement inférieures à $${a.frenchify()}$ :
|
|
28
|
+
|
|
29
|
+
${valuesBelowA
|
|
30
|
+
.map((v) => `
|
|
31
|
+
|
|
32
|
+
$${v.frenchify()}$ est $${(a - v).frenchify()}$ points en dessous de $${a.frenchify()}$
|
|
33
|
+
|
|
34
|
+
`)
|
|
35
|
+
.join("")}
|
|
36
|
+
Ce qui fait en tout $${valuesBelowA
|
|
37
|
+
.map((v) => a - v)
|
|
38
|
+
.reduce((acc, v) => acc + v, 0)
|
|
39
|
+
.frenchify()}$ points en dessous de $${a.frenchify()}$.
|
|
40
|
+
|
|
41
|
+
Si l'on regarde les valeurs strictement supérieures à $${a.frenchify()}$ :
|
|
42
|
+
|
|
43
|
+
${valuesAboveA
|
|
44
|
+
.map((v) => `
|
|
45
|
+
|
|
46
|
+
$${v.frenchify()}$ est $${(v - a).frenchify()}$ points en dessus de $${a.frenchify()}$
|
|
47
|
+
|
|
48
|
+
`)
|
|
49
|
+
.join("")}
|
|
50
|
+
Ce qui fait en tout $${valuesAboveA
|
|
51
|
+
.map((v) => v - a)
|
|
52
|
+
.reduce((acc, v) => acc + v, 0)
|
|
53
|
+
.frenchify()}$ points au dessus de $${a.frenchify()}$.
|
|
54
|
+
|
|
55
|
+
Le total ${isAboveA ? `supérieur` : `inférieur`} est plus grand, en valeur absolue, que le total ${isAboveA ? `inférieur` : `supérieur`} donc on peut affirmer que la moyenne de cette série est strictement ${isAboveA ? `supérieure` : `inférieure`} à $${a.frenchify()}$.`;
|
|
56
|
+
};
|
|
57
|
+
const getPropositions = (n, { answer }) => {
|
|
58
|
+
const propositions = [];
|
|
59
|
+
addValidProp(propositions, answer, "raw");
|
|
60
|
+
tryToAddWrongProp(propositions, answer == "Oui" ? "Non" : "Oui", "raw");
|
|
61
|
+
tryToAddWrongProp(propositions, "On ne peut pas savoir", "raw");
|
|
62
|
+
return shuffleProps(propositions, n);
|
|
63
|
+
};
|
|
64
|
+
const getAnswer = (identifiers) => {
|
|
65
|
+
const { isAboveA, isQuestionIsAboveA } = identifiers;
|
|
66
|
+
return isQuestionIsAboveA
|
|
67
|
+
? isAboveA
|
|
68
|
+
? "Oui"
|
|
69
|
+
: "Non"
|
|
70
|
+
: isAboveA
|
|
71
|
+
? "Non"
|
|
72
|
+
: "Oui";
|
|
73
|
+
};
|
|
74
|
+
const getPlausibilityOfAverageQuestion = () => {
|
|
75
|
+
function generateA(typeA) {
|
|
76
|
+
switch (typeA) {
|
|
77
|
+
case "10":
|
|
78
|
+
default:
|
|
79
|
+
return randint(1, 6) * 10;
|
|
80
|
+
case "110":
|
|
81
|
+
return randint(1, 6) * 100 + 10;
|
|
82
|
+
case "1010":
|
|
83
|
+
return randint(60, 100) * 100 + 10;
|
|
84
|
+
}
|
|
85
|
+
}
|
|
86
|
+
const typeA = random(["10", "110", "1010"]);
|
|
87
|
+
const a = generateA(typeA);
|
|
88
|
+
const seriesAvgAbove0 = [
|
|
89
|
+
[-3, -3, -1, 0, +2, +7],
|
|
90
|
+
[-3, -3, -1, 0, +1, +8],
|
|
91
|
+
[-3, -3, -1, 0, +3, +6],
|
|
92
|
+
[-4, -2, -1, 0, +2, +7],
|
|
93
|
+
[-5, -1, -1, 0, +1, +8],
|
|
94
|
+
[-3, -3, 0, 0, +2, +7],
|
|
95
|
+
[-3, -3, 0, 0, +1, +8],
|
|
96
|
+
[-3, -3, 0, 0, +3, +6],
|
|
97
|
+
[-4, -2, 0, 0, +2, +7],
|
|
98
|
+
[-5, -1, 0, 0, +1, +8],
|
|
99
|
+
[-4, -3, 0, +1, +1, +7],
|
|
100
|
+
[-4, -3, 0, +1, +2, +6],
|
|
101
|
+
[-4, -3, 0, +3, +3, +3],
|
|
102
|
+
[-5, -2, 0, +2, +2, +5],
|
|
103
|
+
[-6, -1, 0, +2, +3, +4],
|
|
104
|
+
];
|
|
105
|
+
[...seriesAvgAbove0].forEach(([a, b, c, d, e, f]) => {
|
|
106
|
+
seriesAvgAbove0.push([a - 1, b - 1, c, d, e + 1, f + 1]);
|
|
107
|
+
seriesAvgAbove0.push([a - 2, b - 2, c, d, e + 2, f + 2]);
|
|
108
|
+
seriesAvgAbove0.push([a - 3, b - 3, c, d, e + 3, f + 3]);
|
|
109
|
+
});
|
|
110
|
+
const isAboveA = coinFlip();
|
|
111
|
+
const values = (isAboveA
|
|
112
|
+
? random(seriesAvgAbove0)
|
|
113
|
+
: random(seriesAvgAbove0)
|
|
114
|
+
.toReversed()
|
|
115
|
+
.map((v) => -v)).map((v) => v + a);
|
|
116
|
+
const isQuestionIsAboveA = coinFlip();
|
|
117
|
+
return getQuestionFromIdentifiers({
|
|
118
|
+
a,
|
|
119
|
+
values,
|
|
120
|
+
isAboveA,
|
|
121
|
+
isQuestionIsAboveA,
|
|
122
|
+
});
|
|
123
|
+
};
|
|
124
|
+
const getQuestionFromIdentifiers = (identifiers) => {
|
|
125
|
+
return {
|
|
126
|
+
answer: getAnswer(identifiers),
|
|
127
|
+
instruction: getInstruction(identifiers),
|
|
128
|
+
keys: [],
|
|
129
|
+
answerFormat: "raw",
|
|
130
|
+
identifiers,
|
|
131
|
+
hint: getHint(identifiers),
|
|
132
|
+
correction: getCorrection(identifiers),
|
|
133
|
+
};
|
|
134
|
+
};
|
|
135
|
+
export const plausibilityOfAverage = {
|
|
136
|
+
id: "plausibilityOfAverage",
|
|
137
|
+
label: "S’assurer de la vraisemblance, de la cohérence d’un résultat (moyenne d'une série)",
|
|
138
|
+
isSingleStep: true,
|
|
139
|
+
generator: (nb, opts) => getDistinctQuestions(() => getPlausibilityOfAverageQuestion(opts), nb),
|
|
140
|
+
qcmTimer: 60,
|
|
141
|
+
freeTimer: 60,
|
|
142
|
+
getPropositions,
|
|
143
|
+
subject: "Mathématiques",
|
|
144
|
+
getInstruction,
|
|
145
|
+
getHint,
|
|
146
|
+
getCorrection,
|
|
147
|
+
getAnswer,
|
|
148
|
+
getQuestionFromIdentifiers,
|
|
149
|
+
hasHintAndCorrection: true,
|
|
150
|
+
answerType: "QCU",
|
|
151
|
+
};
|
|
@@ -3,6 +3,9 @@ type Identifiers = {
|
|
|
3
3
|
randomValues: number[];
|
|
4
4
|
randomQuartile: number;
|
|
5
5
|
};
|
|
6
|
-
|
|
6
|
+
type Options = {
|
|
7
|
+
nbValues: number;
|
|
8
|
+
};
|
|
9
|
+
export declare const quartilesList: Exercise<Identifiers, Options>;
|
|
7
10
|
export {};
|
|
8
11
|
//# sourceMappingURL=quartilesList.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"quartilesList.d.ts","sourceRoot":"","sources":["../../../../../src/exercises/math/probaStat/stats1var/quartilesList.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"quartilesList.d.ts","sourceRoot":"","sources":["../../../../../src/exercises/math/probaStat/stats1var/quartilesList.ts"],"names":[],"mappings":"AAQA,OAAO,EACL,QAAQ,EAkBT,MAAM,sBAAsB,CAAC;AAG9B,KAAK,WAAW,GAAG;IACjB,YAAY,EAAE,MAAM,EAAE,CAAC;IACvB,cAAc,EAAE,MAAM,CAAC;CACxB,CAAC;AAyGF,KAAK,OAAO,GAAG;IACb,QAAQ,EAAE,MAAM,CAAC;CAClB,CAAC;AAeF,eAAO,MAAM,aAAa,EAAE,QAAQ,CAAC,WAAW,EAAE,OAAO,CAgBxD,CAAC"}
|
|
@@ -2,7 +2,8 @@ import { randint } from "../../../../math/utils/random/randint.js";
|
|
|
2
2
|
import { firstQuartile, thirdQuartile, } from "../../../../math/utils/stats/quartiles.js";
|
|
3
3
|
import { frac } from "../../../../tree/nodes/operators/fractionNode.js";
|
|
4
4
|
import { multiply } from "../../../../tree/nodes/operators/multiplyNode.js";
|
|
5
|
-
import {
|
|
5
|
+
import { random } from "../../../../utils/alea/random.js";
|
|
6
|
+
import { GeneratorOptionTarget, GeneratorOptionType, addValidProp, propWhile, shuffleProps, tryToAddWrongProp, } from "../../../exercise.js";
|
|
6
7
|
import { getDistinctQuestions } from "../../../utils/getDistinctQuestions.js";
|
|
7
8
|
const getInstruction = ({ randomQuartile, randomValues, }) => {
|
|
8
9
|
let quartileToString = "";
|
|
@@ -15,7 +16,7 @@ $$
|
|
|
15
16
|
${randomValues.join(";\\ ")}
|
|
16
17
|
$$
|
|
17
18
|
|
|
18
|
-
Calculer le ${quartileToString} de cette série de valeurs.`;
|
|
19
|
+
Calculer le ${quartileToString} de cette série de $${randomValues.length}$ valeurs.`;
|
|
19
20
|
};
|
|
20
21
|
const getAnswer = (identifiers) => {
|
|
21
22
|
const { randomValues, randomQuartile } = identifiers;
|
|
@@ -24,18 +25,6 @@ const getAnswer = (identifiers) => {
|
|
|
24
25
|
else
|
|
25
26
|
return thirdQuartile(randomValues).frenchify();
|
|
26
27
|
};
|
|
27
|
-
const getQuartiles = () => {
|
|
28
|
-
const randomValues = [];
|
|
29
|
-
const length = randint(5, 9);
|
|
30
|
-
for (let i = 0; i < length; i++)
|
|
31
|
-
randomValues.push(randint(1, 20));
|
|
32
|
-
const randomQuartile = randint(0, 2);
|
|
33
|
-
const identifiers = {
|
|
34
|
-
randomValues: randomValues.sort((a, b) => a - b),
|
|
35
|
-
randomQuartile,
|
|
36
|
-
};
|
|
37
|
-
return getQuestionFromIdentifiers(identifiers);
|
|
38
|
-
};
|
|
39
28
|
const getHint = (identifiers) => {
|
|
40
29
|
const { randomQuartile } = identifiers;
|
|
41
30
|
if (randomQuartile === 0)
|
|
@@ -54,18 +43,6 @@ Puisque $${rank.toTex()} = ${rankEv.frenchify()}$, le ${numeral} quartile est la
|
|
|
54
43
|
|
|
55
44
|
Le ${numeral} quartile est donc $${getAnswer(identifiers)}$.`;
|
|
56
45
|
};
|
|
57
|
-
const getQuestionFromIdentifiers = (identifiers) => {
|
|
58
|
-
const question = {
|
|
59
|
-
instruction: getInstruction(identifiers),
|
|
60
|
-
answer: getAnswer(identifiers),
|
|
61
|
-
keys: [],
|
|
62
|
-
answerFormat: "tex",
|
|
63
|
-
identifiers,
|
|
64
|
-
hint: getHint(identifiers),
|
|
65
|
-
correction: getCorrection(identifiers),
|
|
66
|
-
};
|
|
67
|
-
return question;
|
|
68
|
-
};
|
|
69
46
|
const getPropositions = (n, { answer, randomValues }) => {
|
|
70
47
|
const propositions = [];
|
|
71
48
|
addValidProp(propositions, answer);
|
|
@@ -81,12 +58,54 @@ const getPropositions = (n, { answer, randomValues }) => {
|
|
|
81
58
|
const isAnswerValid = (ans, { answer }) => {
|
|
82
59
|
return ans === answer;
|
|
83
60
|
};
|
|
61
|
+
const getQuartiles = (optsIn) => {
|
|
62
|
+
const opts = optsIn ?? optsDefault;
|
|
63
|
+
const randomValues = [];
|
|
64
|
+
const length = Array.isArray(opts.nbValues)
|
|
65
|
+
? random(opts.nbValues.map((v) => +v))
|
|
66
|
+
: opts.nbValues;
|
|
67
|
+
for (let i = 0; i < length; i++)
|
|
68
|
+
randomValues.push(randint(1, 20));
|
|
69
|
+
const randomQuartile = randint(0, 2);
|
|
70
|
+
const identifiers = {
|
|
71
|
+
randomValues: randomValues.sort((a, b) => a - b),
|
|
72
|
+
randomQuartile,
|
|
73
|
+
};
|
|
74
|
+
return getQuestionFromIdentifiers(identifiers);
|
|
75
|
+
};
|
|
76
|
+
const getQuestionFromIdentifiers = (identifiers, opts) => {
|
|
77
|
+
const question = {
|
|
78
|
+
instruction: getInstruction(identifiers),
|
|
79
|
+
answer: getAnswer(identifiers),
|
|
80
|
+
keys: [],
|
|
81
|
+
answerFormat: "tex",
|
|
82
|
+
identifiers,
|
|
83
|
+
hint: getHint(identifiers),
|
|
84
|
+
correction: getCorrection(identifiers),
|
|
85
|
+
options: opts,
|
|
86
|
+
};
|
|
87
|
+
return question;
|
|
88
|
+
};
|
|
89
|
+
const optsDefault = {
|
|
90
|
+
nbValues: 12,
|
|
91
|
+
};
|
|
92
|
+
const options = [
|
|
93
|
+
{
|
|
94
|
+
id: "nbValues",
|
|
95
|
+
label: "Nombre de valeurs dans la liste",
|
|
96
|
+
target: GeneratorOptionTarget.generation,
|
|
97
|
+
type: GeneratorOptionType.multiselect,
|
|
98
|
+
values: [4, 5, 7, 8, 11, 12, 19, 20],
|
|
99
|
+
defaultValue: [optsDefault.nbValues],
|
|
100
|
+
},
|
|
101
|
+
];
|
|
84
102
|
export const quartilesList = {
|
|
85
103
|
id: "quartilesList",
|
|
86
104
|
connector: "=",
|
|
87
105
|
label: "Calcul des quartiles d'une liste de valeurs",
|
|
88
106
|
isSingleStep: false,
|
|
89
|
-
generator: (nb) => getDistinctQuestions(getQuartiles, nb),
|
|
107
|
+
generator: (nb, opts) => getDistinctQuestions(() => getQuartiles(opts ?? optsDefault), nb),
|
|
108
|
+
options,
|
|
90
109
|
qcmTimer: 60,
|
|
91
110
|
freeTimer: 60,
|
|
92
111
|
getPropositions,
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"geometricFindExplicitFormula.d.ts","sourceRoot":"","sources":["../../../../../src/exercises/math/sequences/geometric/geometricFindExplicitFormula.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,QAAQ,EAcT,MAAM,6BAA6B,CAAC;
|
|
1
|
+
{"version":3,"file":"geometricFindExplicitFormula.d.ts","sourceRoot":"","sources":["../../../../../src/exercises/math/sequences/geometric/geometricFindExplicitFormula.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,QAAQ,EAcT,MAAM,6BAA6B,CAAC;AAcrC,KAAK,WAAW,GAAG;IACjB,MAAM,EAAE,MAAM,CAAC;IACf,UAAU,EAAE,MAAM,CAAC;CACpB,CAAC;AA8HF,eAAO,MAAM,4BAA4B,EAAE,QAAQ,CAAC,WAAW,CAc9D,CAAC"}
|
|
@@ -2,11 +2,13 @@ import { addValidProp, propWhile, tryToAddWrongProp, } from "../../../../exercis
|
|
|
2
2
|
import { getDistinctQuestions } from "../../../../exercises/utils/getDistinctQuestions.js";
|
|
3
3
|
import { randint } from "../../../../math/utils/random/randint.js";
|
|
4
4
|
import { NumberNode } from "../../../../tree/nodes/numbers/numberNode.js";
|
|
5
|
-
import { EqualNode } from "../../../../tree/nodes/equations/equalNode.js";
|
|
5
|
+
import { EqualNode, isEqualNode, } from "../../../../tree/nodes/equations/equalNode.js";
|
|
6
6
|
import { MultiplyNode } from "../../../../tree/nodes/operators/multiplyNode.js";
|
|
7
7
|
import { PowerNode } from "../../../../tree/nodes/operators/powerNode.js";
|
|
8
8
|
import { VariableNode } from "../../../../tree/nodes/variables/variableNode.js";
|
|
9
9
|
import { shuffle } from "../../../../utils/alea/shuffle.js";
|
|
10
|
+
import { parseLatex } from "../../../../tree/parsers/latexParser.js";
|
|
11
|
+
import { substract } from "../../../../tree/nodes/operators/substractNode.js";
|
|
10
12
|
const getInstruction = (identifiers) => {
|
|
11
13
|
const { firstValue, reason } = identifiers;
|
|
12
14
|
const firstRank = 0;
|
|
@@ -81,7 +83,17 @@ const isAnswerValid = (ans, { reason, firstValue }) => {
|
|
|
81
83
|
allowRawRightChildAsSolution: true,
|
|
82
84
|
});
|
|
83
85
|
const texs = equal.toAllValidTexs();
|
|
84
|
-
return texs.includes(ans)
|
|
86
|
+
return (texs.includes(ans) ||
|
|
87
|
+
(() => {
|
|
88
|
+
let nodeAns = parseLatex(ans);
|
|
89
|
+
if (isEqualNode(nodeAns)) {
|
|
90
|
+
nodeAns = nodeAns.rightChild;
|
|
91
|
+
}
|
|
92
|
+
const differenceNode = substract(nodeAns, formula);
|
|
93
|
+
return (differenceNode.evaluate({ n: 0 }) === 0 &&
|
|
94
|
+
differenceNode.evaluate({ n: 1 }) === 0 &&
|
|
95
|
+
differenceNode.evaluate({ n: 5 }) === 0);
|
|
96
|
+
})());
|
|
85
97
|
};
|
|
86
98
|
export const geometricFindExplicitFormula = {
|
|
87
99
|
id: "geometricFindExplicitFormula",
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"geometricReasonUsage.d.ts","sourceRoot":"","sources":["../../../../../src/exercises/math/sequences/geometric/geometricReasonUsage.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,QAAQ,
|
|
1
|
+
{"version":3,"file":"geometricReasonUsage.d.ts","sourceRoot":"","sources":["../../../../../src/exercises/math/sequences/geometric/geometricReasonUsage.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,QAAQ,EAcT,MAAM,6BAA6B,CAAC;AAUrC,KAAK,WAAW,GAAG;IACjB,MAAM,EAAE,MAAM,CAAC;IACf,SAAS,EAAE,MAAM,CAAC;IAClB,SAAS,EAAE,MAAM,CAAC;IAClB,UAAU,EAAE,MAAM,CAAC;CACpB,CAAC;AAwGF,eAAO,MAAM,oBAAoB,EAAE,QAAQ,CAAC,WAAW,CAYtD,CAAC"}
|
|
@@ -1,20 +1,26 @@
|
|
|
1
|
-
import { addValidProp, propWhile, tryToAddWrongProp, } from "../../../../exercises/exercise.js";
|
|
1
|
+
import { addValidProp, propWhile, shuffleProps, tryToAddWrongProp, } from "../../../../exercises/exercise.js";
|
|
2
2
|
import { getDistinctQuestions } from "../../../../exercises/utils/getDistinctQuestions.js";
|
|
3
3
|
import { randint } from "../../../../math/utils/random/randint.js";
|
|
4
|
-
import {
|
|
4
|
+
import { add } from "../../../../tree/nodes/operators/addNode.js";
|
|
5
|
+
import { multiply } from "../../../../tree/nodes/operators/multiplyNode.js";
|
|
6
|
+
import { power } from "../../../../tree/nodes/operators/powerNode.js";
|
|
7
|
+
import { substract } from "../../../../tree/nodes/operators/substractNode.js";
|
|
8
|
+
import { parseAlgebraic } from "../../../../tree/parsers/latexParser.js";
|
|
9
|
+
import { probaLawFlip } from "../../../../utils/alea/probaLawFlip.js";
|
|
5
10
|
const getInstruction = (identifiers) => {
|
|
6
|
-
const { reason, startRank, startValue } = identifiers;
|
|
7
|
-
const askedRank = startRank + 1;
|
|
11
|
+
const { reason, startRank, startValue, askedRank } = identifiers;
|
|
8
12
|
return `$(u_n)$ est une suite géométrique de raison $q = ${reason}$ et on sait que $u_{${startRank}} = ${startValue}$. Calculer : $u_{${askedRank}}$`;
|
|
9
13
|
};
|
|
10
14
|
const getAnswer = (identifiers) => {
|
|
11
|
-
const
|
|
12
|
-
const answer = (startValue * reason).toString();
|
|
15
|
+
const answer = getAnswerNode(identifiers).evaluate().frenchify();
|
|
13
16
|
return answer;
|
|
14
17
|
};
|
|
18
|
+
const getAnswerNode = (identifiers) => {
|
|
19
|
+
const { reason, startValue, startRank, askedRank } = identifiers;
|
|
20
|
+
return multiply(startValue, power(reason, substract(askedRank, startRank)));
|
|
21
|
+
};
|
|
15
22
|
const getStartStatement = (identifiers) => {
|
|
16
|
-
const {
|
|
17
|
-
const askedRank = startRank + 1;
|
|
23
|
+
const { askedRank } = identifiers;
|
|
18
24
|
return `u_{${askedRank}}`;
|
|
19
25
|
};
|
|
20
26
|
const getQuestionFromIdentifiers = (identifiers) => {
|
|
@@ -31,26 +37,44 @@ const getQuestionFromIdentifiers = (identifiers) => {
|
|
|
31
37
|
const getGeometricReasonUsage = () => {
|
|
32
38
|
const reason = randint(2, 10);
|
|
33
39
|
const startRank = randint(0, 20);
|
|
40
|
+
const askedRank = startRank +
|
|
41
|
+
probaLawFlip([
|
|
42
|
+
[1, 0.5],
|
|
43
|
+
[2, 0.3],
|
|
44
|
+
[3, 0.2],
|
|
45
|
+
]);
|
|
34
46
|
const startValue = randint(1, 10);
|
|
35
|
-
const identifiers = { startValue, reason, startRank };
|
|
47
|
+
const identifiers = { startValue, reason, startRank, askedRank };
|
|
36
48
|
return getQuestionFromIdentifiers(identifiers);
|
|
37
49
|
};
|
|
38
|
-
const getPropositions = (n, { answer, startValue, reason }) => {
|
|
50
|
+
const getPropositions = (n, { answer, startValue, reason, askedRank, startRank }) => {
|
|
39
51
|
const propositions = [];
|
|
40
52
|
addValidProp(propositions, answer);
|
|
41
|
-
|
|
42
|
-
|
|
53
|
+
//next term
|
|
54
|
+
tryToAddWrongProp(propositions, getAnswerNode({
|
|
55
|
+
startValue,
|
|
56
|
+
startRank,
|
|
57
|
+
reason,
|
|
58
|
+
askedRank: startRank + 1,
|
|
59
|
+
})
|
|
60
|
+
.evaluate()
|
|
61
|
+
.frenchify());
|
|
62
|
+
//arithmetic
|
|
63
|
+
tryToAddWrongProp(propositions, add(startValue, reason).evaluate().frenchify());
|
|
64
|
+
tryToAddWrongProp(propositions, add(startValue, multiply(reason, substract(askedRank, startRank)))
|
|
65
|
+
.evaluate()
|
|
66
|
+
.frenchify());
|
|
67
|
+
//savoir ses tables
|
|
43
68
|
propWhile(propositions, n, () => {
|
|
44
69
|
tryToAddWrongProp(propositions, startValue * (reason + randint(-reason + 1, 6, [0])) + "");
|
|
45
70
|
});
|
|
46
|
-
return
|
|
71
|
+
return shuffleProps(propositions, n);
|
|
47
72
|
};
|
|
48
|
-
const isAnswerValid = (ans, { answer,
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
].includes(ans);
|
|
73
|
+
const isAnswerValid = (ans, { answer, ...identifiers }) => {
|
|
74
|
+
const { askedRank } = identifiers;
|
|
75
|
+
return ([answer, `u_{${askedRank}}=${answer}`, `u_${askedRank}=${answer}`].includes(ans) ||
|
|
76
|
+
//tant pis pour les tables
|
|
77
|
+
parseAlgebraic(ans).evaluate() === getAnswerNode(identifiers).evaluate());
|
|
54
78
|
};
|
|
55
79
|
export const geometricReasonUsage = {
|
|
56
80
|
id: "geometricReasonUsage",
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"sequenceEvaluation.d.ts","sourceRoot":"","sources":["../../../../src/exercises/math/sequences/sequenceEvaluation.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,QAAQ,EAaT,MAAM,6BAA6B,CAAC;
|
|
1
|
+
{"version":3,"file":"sequenceEvaluation.d.ts","sourceRoot":"","sources":["../../../../src/exercises/math/sequences/sequenceEvaluation.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,QAAQ,EAaT,MAAM,6BAA6B,CAAC;AAYrC,KAAK,WAAW,GAAG;IACjB,OAAO,EAAE,MAAM,CAAC;IAChB,MAAM,EAAE,MAAM,EAAE,CAAC;IACjB,QAAQ,EAAE,MAAM,CAAC;IACjB,SAAS,EAAE,MAAM,CAAC;CACnB,CAAC;AAkOF,eAAO,MAAM,kBAAkB,EAAE,QAAQ,CAAC,WAAW,CAYpD,CAAC"}
|
|
@@ -5,7 +5,9 @@ import { randint } from "../../../math/utils/random/randint.js";
|
|
|
5
5
|
import { NumberNode } from "../../../tree/nodes/numbers/numberNode.js";
|
|
6
6
|
import { AddNode } from "../../../tree/nodes/operators/addNode.js";
|
|
7
7
|
import { MultiplyNode } from "../../../tree/nodes/operators/multiplyNode.js";
|
|
8
|
+
import { substract } from "../../../tree/nodes/operators/substractNode.js";
|
|
8
9
|
import { VariableNode } from "../../../tree/nodes/variables/variableNode.js";
|
|
10
|
+
import { parseAlgebraic } from "../../../tree/parsers/latexParser.js";
|
|
9
11
|
const getInstruction = (identifiers) => {
|
|
10
12
|
const { termeid, affine, termeAdd, termeMult } = identifiers;
|
|
11
13
|
const aff = new Affine(affine[0], affine[1], "n");
|
|
@@ -149,7 +151,22 @@ const isAnswerValid = (ans, { affine, termeid, termeAdd, termeMult }) => {
|
|
|
149
151
|
});
|
|
150
152
|
}
|
|
151
153
|
const latexs = validanswer.toAllValidTexs();
|
|
152
|
-
return latexs.includes(ans)
|
|
154
|
+
return (latexs.includes(ans) ||
|
|
155
|
+
(() => {
|
|
156
|
+
//allow "5 \\times n - 10"
|
|
157
|
+
const ansWithoutTimes = ans.replaceAll("\\times", "").replaceAll(" ", "");
|
|
158
|
+
const [nodeAns, nodeAnsWithoutTimes] = [ans, ansWithoutTimes].map((tex) => parseAlgebraic(tex));
|
|
159
|
+
const differenceNode = substract(nodeAns, nodeAnsWithoutTimes);
|
|
160
|
+
const isSameNode = differenceNode.evaluate({ n: 0 }) === 0 &&
|
|
161
|
+
differenceNode.evaluate({ n: 1 }) === 0 &&
|
|
162
|
+
differenceNode.evaluate({ n: 5 }) === 0;
|
|
163
|
+
if (!isSameNode) {
|
|
164
|
+
return false;
|
|
165
|
+
}
|
|
166
|
+
else {
|
|
167
|
+
return latexs.includes(ansWithoutTimes);
|
|
168
|
+
}
|
|
169
|
+
})());
|
|
153
170
|
};
|
|
154
171
|
export const sequenceEvaluation = {
|
|
155
172
|
id: "sequenceEvaluation",
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"chemicalEquations.d.ts","sourceRoot":"","sources":["../../../../src/exercises/pc/chemicalReactions/chemicalEquations.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,QAAQ,EAaT,MAAM,6BAA6B,CAAC;AAErC,OAAO,EAGL,eAAe,EAChB,MAAM,mDAAmD,CAAC;
|
|
1
|
+
{"version":3,"file":"chemicalEquations.d.ts","sourceRoot":"","sources":["../../../../src/exercises/pc/chemicalReactions/chemicalEquations.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,QAAQ,EAaT,MAAM,6BAA6B,CAAC;AAErC,OAAO,EAGL,eAAe,EAChB,MAAM,mDAAmD,CAAC;AAI3D,KAAK,WAAW,GAAG;IACjB,aAAa,EAAE,eAAe,EAAE,CAAC;CAClC,CAAC;AAuEF,eAAO,MAAM,iBAAiB,EAAE,QAAQ,CAAC,WAAW,CAanD,CAAC"}
|
|
@@ -17,7 +17,20 @@ const getAnswer = (identifiers) => {
|
|
|
17
17
|
};
|
|
18
18
|
const getKeys = (identifiers) => {
|
|
19
19
|
const reaction = new Reaction(identifiers.reactionArray);
|
|
20
|
-
return [
|
|
20
|
+
return [
|
|
21
|
+
"rightarrow",
|
|
22
|
+
...reaction.getSpeciesFormula().map((formula) => {
|
|
23
|
+
return {
|
|
24
|
+
id: "custom",
|
|
25
|
+
label: formula,
|
|
26
|
+
labelType: "tex",
|
|
27
|
+
mathfieldInstructions: {
|
|
28
|
+
method: "write",
|
|
29
|
+
content: formula,
|
|
30
|
+
},
|
|
31
|
+
};
|
|
32
|
+
}),
|
|
33
|
+
];
|
|
21
34
|
};
|
|
22
35
|
const getQuestionFromIdentifiers = (identifiers) => {
|
|
23
36
|
const question = {
|
|
@@ -44,7 +57,9 @@ const getPropositions = (n, { answer, reactionArray }) => {
|
|
|
44
57
|
return shuffle(propositions);
|
|
45
58
|
};
|
|
46
59
|
const isAnswerValid = (ans, { answer }) => {
|
|
47
|
-
|
|
60
|
+
const ansNoSpace = ans.replaceAll(" ", "");
|
|
61
|
+
const answerNoSpace = answer.replaceAll(" ", "");
|
|
62
|
+
return ansNoSpace === answerNoSpace;
|
|
48
63
|
};
|
|
49
64
|
export const chemicalEquations = {
|
|
50
65
|
id: "chemicalEquations",
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"calculateUEqualsRI.d.ts","sourceRoot":"","sources":["../../../../src/exercises/pc/electricity/calculateUEqualsRI.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,QAAQ,EAYT,MAAM,6BAA6B,CAAC;AAOrC,KAAK,WAAW,GAAG;IACjB,CAAC,EAAE,MAAM,CAAC;CACX,CAAC;AAsEF,eAAO,MAAM,kBAAkB,EAAE,QAAQ,CAAC,WAAW,CAcpD,CAAC"}
|