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
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { GeneratorOptionTarget, GeneratorOptionType, addValidProp,
|
|
1
|
+
import { GeneratorOptionTarget, GeneratorOptionType, addValidProp, tryToAddWrongProp, } from "../../../../exercises/exercise.js";
|
|
2
2
|
import { getDistinctQuestions } from "../../../../exercises/utils/getDistinctQuestions.js";
|
|
3
3
|
import { randfloat } from "../../../../math/utils/random/randfloat.js";
|
|
4
4
|
import { randint } from "../../../../math/utils/random/randint.js";
|
|
@@ -13,93 +13,63 @@ import { frac } from "../../../../tree/nodes/operators/fractionNode.js";
|
|
|
13
13
|
import { multiply } from "../../../../tree/nodes/operators/multiplyNode.js";
|
|
14
14
|
import { power } from "../../../../tree/nodes/operators/powerNode.js";
|
|
15
15
|
import { substract } from "../../../../tree/nodes/operators/substractNode.js";
|
|
16
|
-
import { parseLatex } from "../../../../tree/parsers/latexParser.js";
|
|
17
16
|
import { coinFlip } from "../../../../utils/alea/coinFlip.js";
|
|
18
17
|
import { probaFlip } from "../../../../utils/alea/probaFlip.js";
|
|
19
18
|
import { random } from "../../../../utils/alea/random.js";
|
|
20
19
|
import { shuffle } from "../../../../utils/alea/shuffle.js";
|
|
21
|
-
const getAnswer = (identifiers) => {
|
|
22
|
-
const { arrayOfNodeIds, isFilterPossibleProba } = identifiers;
|
|
23
|
-
const arrayOfPossibleProbas = arrayOfNodeIds
|
|
24
|
-
.map((nodeIds) => NodeConstructor.fromIdentifiers(nodeIds))
|
|
25
|
-
.filter((node) => {
|
|
26
|
-
return isFilterPossibleProba
|
|
27
|
-
? node.evaluate() >= 0 && substract(node, 1).evaluate() <= 0
|
|
28
|
-
: node.evaluate() < 0 || substract(node, 1).evaluate() > 0;
|
|
29
|
-
})
|
|
30
|
-
.toSorted((nodeA, nodeB) => substract(nodeA, nodeB).evaluate());
|
|
31
|
-
const answer = arrayOfPossibleProbas.map((node) => node.toTex()).join(";");
|
|
32
|
-
return answer;
|
|
33
|
-
};
|
|
34
20
|
const getInstruction = (identifiers) => {
|
|
35
|
-
const {
|
|
36
|
-
|
|
37
|
-
return `Parmi les valeurs de la liste ci-dessous, donner celles qui sont des valeurs ${isFilterPossibleProba ? "possibles" : "impossibles"} pour une probabilité
|
|
38
|
-
(séparer les valeurs par des points-virgules) :
|
|
39
|
-
$$
|
|
40
|
-
${arrNode.map((node) => node.toTex()).join(" \\hspace{2mm} ; \\hspace{2mm} ")}
|
|
41
|
-
$$
|
|
42
|
-
`;
|
|
21
|
+
const { isFilterPossibleProba } = identifiers;
|
|
22
|
+
return `Parmi les valeurs de la liste ci-dessous, donner celles qui sont des valeurs ${isFilterPossibleProba ? "possibles" : "impossibles"} pour une probabilité.`;
|
|
43
23
|
};
|
|
44
24
|
const getHint = () => {
|
|
45
25
|
return "Une probabilité est toujours comprise entre $0\\%$ et $100\\%$.";
|
|
46
26
|
};
|
|
47
27
|
const getCorrection = (identifiers) => {
|
|
28
|
+
const { arrayOfNodeIds, isFilterPossibleProba } = identifiers;
|
|
29
|
+
const allAnswerTexs = arrayOfNodeIds
|
|
30
|
+
.map((nodeIds) => {
|
|
31
|
+
const node = NodeConstructor.fromIdentifiers(nodeIds);
|
|
32
|
+
const isPossibleProba = node.evaluate() >= 0 && substract(node, 1).evaluate() <= 0;
|
|
33
|
+
return { tex: node.toTex(), isPossibleProba };
|
|
34
|
+
})
|
|
35
|
+
.filter(({ isPossibleProba }) => isPossibleProba === isFilterPossibleProba)
|
|
36
|
+
.map(({ tex }) => tex);
|
|
48
37
|
return `Les valeurs possibles pour une probabilité sont comprises entre $0$ inclus et $1$ inclus.
|
|
49
|
-
|
|
38
|
+
${allAnswerTexs.length > 1
|
|
39
|
+
? `Les réponses attendues (valeurs ${isFilterPossibleProba ? `possibles` : `impossibles`}) étaient`
|
|
40
|
+
: `La réponse attendue (valeur ${isFilterPossibleProba ? `possible` : `impossible`}) était`} donc :
|
|
50
41
|
|
|
42
|
+
${allAnswerTexs
|
|
43
|
+
.map((tex) => `
|
|
44
|
+
|
|
51
45
|
$$
|
|
52
|
-
${
|
|
46
|
+
${tex}
|
|
53
47
|
$$
|
|
54
|
-
|
|
48
|
+
|
|
49
|
+
`)
|
|
50
|
+
.join("")}`;
|
|
55
51
|
};
|
|
56
|
-
const getPropositions = (
|
|
52
|
+
const getPropositions = (_, { answer, ...identifiers }) => {
|
|
57
53
|
const { arrayOfNodeIds, isFilterPossibleProba } = identifiers;
|
|
58
54
|
const propositions = [];
|
|
59
55
|
// addValidProp(propositions, answer);
|
|
60
|
-
const
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
}
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
const arrTex = ansWithoutTrailingSemicolon.split(";");
|
|
75
|
-
const arrNode = arrTex
|
|
76
|
-
.map((tex) => parseLatex(tex))
|
|
77
|
-
.toSorted((nodeA, nodeB) => substract(nodeA, nodeB).evaluate());
|
|
78
|
-
const arrTexSorted = arrNode.map((node) => node.toTex());
|
|
79
|
-
const ansRefined = arrTexSorted.join(";");
|
|
80
|
-
return ansRefined === answer;
|
|
81
|
-
};
|
|
82
|
-
const getKeys = (identifiers) => {
|
|
83
|
-
const { arrayOfNodeIds } = identifiers;
|
|
84
|
-
const arrNode = arrayOfNodeIds.map((nodeIds) => NodeConstructor.fromIdentifiers(nodeIds));
|
|
85
|
-
return [
|
|
86
|
-
"semicolon",
|
|
87
|
-
...arrNode.map((node) => {
|
|
88
|
-
return {
|
|
89
|
-
id: "custom",
|
|
90
|
-
label: node.toTex(),
|
|
91
|
-
labelType: "tex",
|
|
92
|
-
mathfieldInstructions: {
|
|
93
|
-
method: "write",
|
|
94
|
-
content: node.toTex(),
|
|
95
|
-
},
|
|
96
|
-
};
|
|
97
|
-
}),
|
|
98
|
-
];
|
|
56
|
+
const allProbasObj = arrayOfNodeIds.map((nodeIds) => {
|
|
57
|
+
const node = NodeConstructor.fromIdentifiers(nodeIds);
|
|
58
|
+
const isPossibleProba = node.evaluate() >= 0 && substract(node, 1).evaluate() <= 0;
|
|
59
|
+
return { tex: node.toTex(), isPossibleProba };
|
|
60
|
+
});
|
|
61
|
+
allProbasObj.forEach(({ tex, isPossibleProba }) => {
|
|
62
|
+
if (isPossibleProba === isFilterPossibleProba) {
|
|
63
|
+
addValidProp(propositions, tex);
|
|
64
|
+
}
|
|
65
|
+
else {
|
|
66
|
+
tryToAddWrongProp(propositions, tex);
|
|
67
|
+
}
|
|
68
|
+
});
|
|
69
|
+
return propositions;
|
|
99
70
|
};
|
|
100
71
|
const optsDefault = {
|
|
101
72
|
numberTypes: ["Entier", "Décimal", "Fraction", "Puiss10", "Sci", "Réel"],
|
|
102
|
-
nbValues: 8,
|
|
103
73
|
};
|
|
104
74
|
const options = [
|
|
105
75
|
{
|
|
@@ -110,14 +80,6 @@ const options = [
|
|
|
110
80
|
values: ["Entier", "Décimal", "Fraction", "Puiss10", "Sci", "Réel"],
|
|
111
81
|
defaultValue: optsDefault.numberTypes,
|
|
112
82
|
},
|
|
113
|
-
{
|
|
114
|
-
id: "nbValues",
|
|
115
|
-
label: "Longueur de la liste",
|
|
116
|
-
type: GeneratorOptionType.select,
|
|
117
|
-
target: GeneratorOptionTarget.generation,
|
|
118
|
-
values: [5, 6, 7, 8, 9, 10],
|
|
119
|
-
defaultValue: optsDefault.nbValues,
|
|
120
|
-
},
|
|
121
83
|
];
|
|
122
84
|
const createRandomNode = (numberType, isPossibleProba) => {
|
|
123
85
|
if (isPossibleProba) {
|
|
@@ -208,6 +170,7 @@ const createRandomNode = (numberType, isPossibleProba) => {
|
|
|
208
170
|
};
|
|
209
171
|
const getPossibleValuesForProbaQuestion = (optsIn) => {
|
|
210
172
|
const opts = Object.assign(optsDefault, optsIn) ?? optsDefault;
|
|
173
|
+
const nbPropositions = 4;
|
|
211
174
|
const isFilterPossibleProba = coinFlip();
|
|
212
175
|
//create numberType list
|
|
213
176
|
const dictNumberTypeToPriority = {
|
|
@@ -219,11 +182,11 @@ const getPossibleValuesForProbaQuestion = (optsIn) => {
|
|
|
219
182
|
};
|
|
220
183
|
let arrNumberType = [...opts.numberTypes];
|
|
221
184
|
//filler
|
|
222
|
-
while (arrNumberType.length <
|
|
185
|
+
while (arrNumberType.length < nbPropositions) {
|
|
223
186
|
arrNumberType.push(...shuffle(opts.numberTypes));
|
|
224
187
|
}
|
|
225
188
|
arrNumberType = arrNumberType
|
|
226
|
-
.slice(0,
|
|
189
|
+
.slice(0, nbPropositions)
|
|
227
190
|
.toSorted((numberType1, numberType2) => dictNumberTypeToPriority[numberType1] -
|
|
228
191
|
dictNumberTypeToPriority[numberType2]);
|
|
229
192
|
//create list
|
|
@@ -265,9 +228,8 @@ const getPossibleValuesForProbaQuestion = (optsIn) => {
|
|
|
265
228
|
};
|
|
266
229
|
const getQuestionFromIdentifiers = (identifiers) => {
|
|
267
230
|
const question = {
|
|
268
|
-
answer: getAnswer(identifiers),
|
|
269
231
|
instruction: getInstruction(identifiers),
|
|
270
|
-
keys:
|
|
232
|
+
keys: [],
|
|
271
233
|
answerFormat: "tex",
|
|
272
234
|
identifiers,
|
|
273
235
|
hint: getHint(identifiers),
|
|
@@ -284,10 +246,10 @@ export const possibleValuesForProba = {
|
|
|
284
246
|
qcmTimer: 60,
|
|
285
247
|
freeTimer: 60,
|
|
286
248
|
getPropositions,
|
|
287
|
-
isAnswerValid,
|
|
288
249
|
subject: "Mathématiques",
|
|
289
250
|
maxAllowedQuestions: 30,
|
|
290
251
|
getQuestionFromIdentifiers,
|
|
291
252
|
answerType: "QCM",
|
|
253
|
+
isQCM: true,
|
|
292
254
|
hasHintAndCorrection: true,
|
|
293
255
|
};
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
import { Exercise } from "../../exercise.js";
|
|
2
|
+
type Identifiers = {
|
|
3
|
+
situationIndex: number;
|
|
4
|
+
dictShuffle: Record<string, string>;
|
|
5
|
+
pType: string;
|
|
6
|
+
};
|
|
7
|
+
export declare const conditionalProbaWriteFromFrench: Exercise<Identifiers>;
|
|
8
|
+
export {};
|
|
9
|
+
//# sourceMappingURL=conditionalProbaWriteFromFrench.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"conditionalProbaWriteFromFrench.d.ts","sourceRoot":"","sources":["../../../../src/exercises/math/probaStat/conditionalProbaWriteFromFrench.ts"],"names":[],"mappings":"AACA,OAAO,EACL,QAAQ,EAcT,MAAM,mBAAmB,CAAC;AAK3B,KAAK,WAAW,GAAG;IACjB,cAAc,EAAE,MAAM,CAAC;IACvB,WAAW,EAAE,MAAM,CAAC,MAAM,EAAE,MAAM,CAAC,CAAC;IACpC,KAAK,EAAE,MAAM,CAAC;CACf,CAAC;AA0QF,eAAO,MAAM,+BAA+B,EAAE,QAAQ,CAAC,WAAW,CAejE,CAAC"}
|
|
@@ -0,0 +1,217 @@
|
|
|
1
|
+
import { randint } from "../../../math/utils/random/randint.js";
|
|
2
|
+
import { addValidProp, shuffleProps, tryToAddWrongProp, } from "../../exercise.js";
|
|
3
|
+
import { getDistinctQuestions } from "../../utils/getDistinctQuestions.js";
|
|
4
|
+
import { shuffle } from "../../../utils/alea/shuffle.js";
|
|
5
|
+
import { random } from "../../../utils/alea/random.js";
|
|
6
|
+
const situations = [
|
|
7
|
+
{
|
|
8
|
+
context: "Martine est à la plage pour faire de la pêche à pied. Elle ramasse un coquillage.",
|
|
9
|
+
strA: "C'est une moule.",
|
|
10
|
+
strB: "Il y a un petit crabe à l'intérieur.",
|
|
11
|
+
"(A)": "que ce soit une moule",
|
|
12
|
+
"(B)": "qu'il y ait un petit crabe à l'intérieur",
|
|
13
|
+
"(A \\cap B)": "que ce soit une moule avec un petit crabe à l'intérieur",
|
|
14
|
+
"_A(B)": "qu'il y ait un petit crabe à l'intérieur, sachant que c'est une moule",
|
|
15
|
+
"_B(A)": "que ce soit une moule, sachant qu'il y a un petit crabe à l'intérieur",
|
|
16
|
+
},
|
|
17
|
+
{
|
|
18
|
+
context: "Pour payer sa baguette multi-graines, Ahmed prend un billet au hasard dans son portefeuille.",
|
|
19
|
+
strA: "C'est un billet de $10$ euros.",
|
|
20
|
+
strB: "Il est froissé.",
|
|
21
|
+
"(A)": "que ce soit un billet de $10$ euros",
|
|
22
|
+
"(B)": "qu'il soit froissé",
|
|
23
|
+
"(A \\cap B)": "que ce soit un billet froissé de $10$ euros",
|
|
24
|
+
"_A(B)": "qu'il soit froissé, sachant que c'est un billet de $10$ euros",
|
|
25
|
+
"_B(A)": "que ce soit un billet de $10$ euros, sachant qu'il est froissé",
|
|
26
|
+
},
|
|
27
|
+
{
|
|
28
|
+
context: "Cynthia change de station de radio. Elle tombe sur un morceau de musique.",
|
|
29
|
+
strA: "C'est de la pop.",
|
|
30
|
+
strB: "Les paroles sont en anglais.",
|
|
31
|
+
"(A)": "que ce soit de la pop",
|
|
32
|
+
"(B)": "que les paroles soient en anglais",
|
|
33
|
+
"(A \\cap B)": "que ce soit un morceau de pop en anglais",
|
|
34
|
+
"_A(B)": "que les paroles soient en anglais, sachant que c'est de la pop",
|
|
35
|
+
"_B(A)": "que ce soit de la pop, sachant que les paroles sont en anglais",
|
|
36
|
+
},
|
|
37
|
+
{
|
|
38
|
+
context: "À la maison, Henri et Raphaël jouent au Monopoly. Raphaël lance les dés.",
|
|
39
|
+
strA: "Le résultat du lancer est un double $6$.",
|
|
40
|
+
strB: "Les dés sont tombés par terre.",
|
|
41
|
+
"(A)": "que le résulat du lancer soit un double $6$",
|
|
42
|
+
"(B)": "que les dés soient tombés par terre",
|
|
43
|
+
"(A \\cap B)": "que les dés soient tombés par terre et aient donné un double $6$",
|
|
44
|
+
"_A(B)": "que les dés soient tombés par terre, sachant que le résultat du lancer est un double $6$",
|
|
45
|
+
"_B(A)": "que ce soit un double $6$, sachant que les dés sont tombés par terre",
|
|
46
|
+
},
|
|
47
|
+
{
|
|
48
|
+
context: "Au hasard, la maîtresse ouvre le dictionnaire et pose son doigt sur un mot.",
|
|
49
|
+
strA: "C'est un mot de $7$ lettres.",
|
|
50
|
+
strB: 'Le mot se termine par la lettre "e".',
|
|
51
|
+
"(A)": "que ce soit un mot de $7$ lettres",
|
|
52
|
+
"(B)": 'que le mot se termine par un "e"',
|
|
53
|
+
"(A \\cap B)": 'que ce soit un mot de $7$ lettres qui se termine par un "e"',
|
|
54
|
+
"_A(B)": 'que ce soit un mot qui se termine par un "e", sachant que c\'est un mot de $7$ lettres',
|
|
55
|
+
"_B(A)": 'que ce soit un mot de $7$ lettres sachant qu\'il se termine par un "e"',
|
|
56
|
+
},
|
|
57
|
+
{
|
|
58
|
+
context: "Dans une émission TV, le présentateur demande son prénom à quelqu'un dans le public.",
|
|
59
|
+
strA: "Le prénom est Jean-Michel.",
|
|
60
|
+
strB: 'Le prénom commence par la lettre "A".',
|
|
61
|
+
"(A)": "que le prénom soit Jean-Michel",
|
|
62
|
+
"(B)": 'que le prénom commence par la lettre "J"',
|
|
63
|
+
"(A \\cap B)": 'que le prénom soit Jean-Michel et qu\'il commence par un "A"',
|
|
64
|
+
"_A(B)": 'que le prénom commence par un "A", sachant que c\'est Jean-Michel',
|
|
65
|
+
"_B(A)": 'que le prénom soit Jean-Michel, sachant qu\'il commence par un "A"',
|
|
66
|
+
},
|
|
67
|
+
{
|
|
68
|
+
context: "Il est $14$h$37$. Yohann et Sarah sont assis en classe. C'est un cours sur les probabilités.",
|
|
69
|
+
strA: "Yohann dort.",
|
|
70
|
+
strB: "Sarah est attentive.",
|
|
71
|
+
"(A)": "que Yohann dorme",
|
|
72
|
+
"(B)": "que Sarah soit attentive",
|
|
73
|
+
"(A \\cap B)": "que Yohann dorme tandis que Sarah est attentive",
|
|
74
|
+
"_A(B)": "que Sarah soit attentive, sachant que Yohann dort",
|
|
75
|
+
"_B(A)": "que Yohann dorme, sachant que Sarah est attentive",
|
|
76
|
+
},
|
|
77
|
+
];
|
|
78
|
+
const shuffleSituation = (situation, dictShuffle) => {
|
|
79
|
+
function replaceKey(strSrc, dictReplacement) {
|
|
80
|
+
return Object.keys(dictReplacement).reduce((acc, x) => {
|
|
81
|
+
return acc.replace(x, dictReplacement[x]);
|
|
82
|
+
}, strSrc);
|
|
83
|
+
}
|
|
84
|
+
const arrayOfTemporaryKeys = [
|
|
85
|
+
...Array(Object.keys(dictShuffle).length).keys(),
|
|
86
|
+
].map((i) => {
|
|
87
|
+
return `temporaryKey{${i}}`;
|
|
88
|
+
});
|
|
89
|
+
const dictReplacementOriginaltoTemporary = Object.fromEntries(Object.keys(dictShuffle).map((originalKey, i) => {
|
|
90
|
+
return [originalKey, arrayOfTemporaryKeys[i]];
|
|
91
|
+
}));
|
|
92
|
+
const dictReplacementTemporaryToShuffledOriginal = Object.fromEntries(Object.keys(dictShuffle).map((originalKey) => {
|
|
93
|
+
return [
|
|
94
|
+
dictReplacementOriginaltoTemporary[originalKey],
|
|
95
|
+
dictShuffle[originalKey],
|
|
96
|
+
];
|
|
97
|
+
}));
|
|
98
|
+
return Object.fromEntries(Object.entries(situation).map(([k, v]) => [
|
|
99
|
+
k === "(A \\cap B)"
|
|
100
|
+
? k
|
|
101
|
+
: replaceKey(replaceKey(k, dictReplacementOriginaltoTemporary), dictReplacementTemporaryToShuffledOriginal),
|
|
102
|
+
v,
|
|
103
|
+
]));
|
|
104
|
+
};
|
|
105
|
+
const getInstruction = (identifiers) => {
|
|
106
|
+
const { situationIndex, dictShuffle, pType } = identifiers;
|
|
107
|
+
const situation = shuffleSituation(situations[situationIndex], dictShuffle);
|
|
108
|
+
let instruction = `${situation.context}`;
|
|
109
|
+
instruction += `
|
|
110
|
+
|
|
111
|
+
Soit A l'évenement : "${situation.strA}".
|
|
112
|
+
|
|
113
|
+
Soit B l'évenement : "${situation.strB}".`;
|
|
114
|
+
instruction += `
|
|
115
|
+
|
|
116
|
+
Écris en langage mathématique :
|
|
117
|
+
|
|
118
|
+
La probabilité ${situation[pType]}.`;
|
|
119
|
+
return instruction;
|
|
120
|
+
};
|
|
121
|
+
const getAnswer = (identifiers) => {
|
|
122
|
+
const { pType } = identifiers;
|
|
123
|
+
switch (pType) {
|
|
124
|
+
case "(A \\cap B)":
|
|
125
|
+
return `P\\left(A\\cap B\\right)`;
|
|
126
|
+
case "_A(B)":
|
|
127
|
+
return `P_A\\left(B\\right)`;
|
|
128
|
+
case "_B(A)":
|
|
129
|
+
return `P_B\\left(A\\right)`;
|
|
130
|
+
default:
|
|
131
|
+
return "";
|
|
132
|
+
}
|
|
133
|
+
};
|
|
134
|
+
const getHint = () => {
|
|
135
|
+
return `Si $M$ et $N$ sont deux évenements, alors
|
|
136
|
+
|
|
137
|
+
$P(M \\cap N)$ est la probabilité de l'évènement "$M$ et $N$".
|
|
138
|
+
|
|
139
|
+
$P_M(N)$ est la probabilité de l'évènement $N$, sachant que l'évènement $M$ est réalisé.
|
|
140
|
+
|
|
141
|
+
$P_N(M)$ est la probabilité de l'évènement $M$, sachant que l'évènement $N$ est réalisé.`;
|
|
142
|
+
};
|
|
143
|
+
const getCorrection = (identifiers) => {
|
|
144
|
+
const { situationIndex, dictShuffle, pType } = identifiers;
|
|
145
|
+
const situation = shuffleSituation(situations[situationIndex], dictShuffle);
|
|
146
|
+
return `La probabilité ${situation[pType]}${pType === "_A(B)" || pType === "_B(A)" ? ", est" : " n'est pas"} une probabilité conditionnelle.
|
|
147
|
+
${(() => {
|
|
148
|
+
switch (pType) {
|
|
149
|
+
case "(A \\cap B)":
|
|
150
|
+
return `C'est la probabilité de l'évènement "$A$ et $B$", sans condition particulière.`;
|
|
151
|
+
case "_A(B)":
|
|
152
|
+
return `C'est la probabilité sachant A (donc conditionnelle), $P_A$, de l'évènement "$B$".`;
|
|
153
|
+
case "_B(A)":
|
|
154
|
+
return `C'est la probabilité sachant B (donc conditionnelle), $P_B$, de l'évènement "$A$".`;
|
|
155
|
+
}
|
|
156
|
+
})()}
|
|
157
|
+
Elle se note $P${pType}$.`;
|
|
158
|
+
};
|
|
159
|
+
const getConditionalProbaWriteFromFrenchQuestion = () => {
|
|
160
|
+
const pType = random(["(A \\cap B)", "_A(B)", "_B(A)"]);
|
|
161
|
+
const situationIndex = randint(0, situations.length);
|
|
162
|
+
const arrABShuffled = shuffle(["A", "B"]);
|
|
163
|
+
const dictShuffle = Object.fromEntries(["A", "B"].map((c, i) => [c, arrABShuffled[i]]));
|
|
164
|
+
const identifiers = { situationIndex, dictShuffle, pType };
|
|
165
|
+
return getQuestionFromIdentifiers(identifiers);
|
|
166
|
+
};
|
|
167
|
+
const getQuestionFromIdentifiers = (identifiers) => {
|
|
168
|
+
const question = {
|
|
169
|
+
instruction: getInstruction(identifiers),
|
|
170
|
+
answer: getAnswer(identifiers),
|
|
171
|
+
keys: ["P", "cap", "underscore", "A", "B"],
|
|
172
|
+
answerFormat: "tex",
|
|
173
|
+
identifiers,
|
|
174
|
+
hint: getHint(identifiers),
|
|
175
|
+
correction: getCorrection(identifiers),
|
|
176
|
+
};
|
|
177
|
+
return question;
|
|
178
|
+
};
|
|
179
|
+
const getPropositions = (n, { answer }) => {
|
|
180
|
+
const propositions = [];
|
|
181
|
+
addValidProp(propositions, answer);
|
|
182
|
+
tryToAddWrongProp(propositions, `P(A\\cap B)`, "tex");
|
|
183
|
+
tryToAddWrongProp(propositions, `P_A(B)`, "tex");
|
|
184
|
+
tryToAddWrongProp(propositions, `P_B(A)`, "tex");
|
|
185
|
+
tryToAddWrongProp(propositions, `P(A)`, "tex");
|
|
186
|
+
tryToAddWrongProp(propositions, `P(B)`, "tex");
|
|
187
|
+
return shuffleProps(propositions, n);
|
|
188
|
+
};
|
|
189
|
+
const isAnswerValid = (ans, { answer, ...identifiers }) => {
|
|
190
|
+
const { pType } = identifiers;
|
|
191
|
+
switch (pType) {
|
|
192
|
+
case "(A \\cap B)":
|
|
193
|
+
return (`P\\left(A\\cap B\\right)`.trim() === ans ||
|
|
194
|
+
`P\\left(B\\cap A\\right)`.trim() === ans);
|
|
195
|
+
case "_A(B)":
|
|
196
|
+
return `P_A\\left(B\\right)`.trim() === ans.trim();
|
|
197
|
+
case "_B(A)":
|
|
198
|
+
return `P_B\\left(A\\right)`.trim() === ans.trim();
|
|
199
|
+
default:
|
|
200
|
+
return false;
|
|
201
|
+
}
|
|
202
|
+
};
|
|
203
|
+
export const conditionalProbaWriteFromFrench = {
|
|
204
|
+
id: "conditionalProbaWriteFromFrench",
|
|
205
|
+
connector: "=",
|
|
206
|
+
label: "Ecrire une probabilité en langage mathématique",
|
|
207
|
+
isSingleStep: false,
|
|
208
|
+
generator: (nb) => getDistinctQuestions(getConditionalProbaWriteFromFrenchQuestion, nb),
|
|
209
|
+
qcmTimer: 60,
|
|
210
|
+
freeTimer: 60,
|
|
211
|
+
getPropositions,
|
|
212
|
+
isAnswerValid,
|
|
213
|
+
subject: "Mathématiques",
|
|
214
|
+
hasHintAndCorrection: true,
|
|
215
|
+
getQuestionFromIdentifiers,
|
|
216
|
+
answerType: "QCU",
|
|
217
|
+
};
|
|
@@ -13,4 +13,6 @@ export * from "./unionIntersectionProba.js";
|
|
|
13
13
|
export * from "./checkEquiprobability.js";
|
|
14
14
|
export * from "./events/index.js";
|
|
15
15
|
export * from "./basicProbas/index.js";
|
|
16
|
+
export * from "./probaAsSumOfProbas.js";
|
|
17
|
+
export * from "./conditionalProbaWriteFromFrench.js";
|
|
16
18
|
//# sourceMappingURL=index.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../src/exercises/math/probaStat/index.ts"],"names":[],"mappings":"AAAA,cAAc,6BAA6B,CAAC;AAC5C,cAAc,sBAAsB,CAAC;AACrC,cAAc,sBAAsB,CAAC;AACrC,cAAc,sBAAsB,CAAC;AACrC,cAAc,mBAAmB,CAAC;AAClC,cAAc,6BAA6B,CAAC;AAC5C,cAAc,8BAA8B,CAAC;AAC7C,cAAc,gCAAgC,CAAC;AAC/C,cAAc,qBAAqB,CAAC;AACpC,cAAc,uBAAuB,CAAC;AACtC,cAAc,2BAA2B,CAAC;AAC1C,cAAc,6BAA6B,CAAC;AAC5C,cAAc,2BAA2B,CAAC;AAC1C,cAAc,mBAAmB,CAAC;AAClC,cAAc,wBAAwB,CAAC"}
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../src/exercises/math/probaStat/index.ts"],"names":[],"mappings":"AAAA,cAAc,6BAA6B,CAAC;AAC5C,cAAc,sBAAsB,CAAC;AACrC,cAAc,sBAAsB,CAAC;AACrC,cAAc,sBAAsB,CAAC;AACrC,cAAc,mBAAmB,CAAC;AAClC,cAAc,6BAA6B,CAAC;AAC5C,cAAc,8BAA8B,CAAC;AAC7C,cAAc,gCAAgC,CAAC;AAC/C,cAAc,qBAAqB,CAAC;AACpC,cAAc,uBAAuB,CAAC;AACtC,cAAc,2BAA2B,CAAC;AAC1C,cAAc,6BAA6B,CAAC;AAC5C,cAAc,2BAA2B,CAAC;AAC1C,cAAc,mBAAmB,CAAC;AAClC,cAAc,wBAAwB,CAAC;AACvC,cAAc,yBAAyB,CAAC;AACxC,cAAc,sCAAsC,CAAC"}
|
|
@@ -13,3 +13,5 @@ export * from "./unionIntersectionProba.js";
|
|
|
13
13
|
export * from "./checkEquiprobability.js";
|
|
14
14
|
export * from "./events/index.js";
|
|
15
15
|
export * from "./basicProbas/index.js";
|
|
16
|
+
export * from "./probaAsSumOfProbas.js";
|
|
17
|
+
export * from "./conditionalProbaWriteFromFrench.js";
|
|
@@ -0,0 +1,30 @@
|
|
|
1
|
+
import { Exercise } from "../../exercise.js";
|
|
2
|
+
import { NodeIdentifiers } from "../../../tree/nodes/nodeConstructor.js";
|
|
3
|
+
type Identifiers = {
|
|
4
|
+
indexSituation: number;
|
|
5
|
+
eventIds: EventIdentifiers;
|
|
6
|
+
arrProba: NodeIdentifiers[];
|
|
7
|
+
isProbasAreNumbers: boolean;
|
|
8
|
+
};
|
|
9
|
+
type EventIdentifiers = {
|
|
10
|
+
type: "elementary";
|
|
11
|
+
index: number;
|
|
12
|
+
id: string;
|
|
13
|
+
str: string;
|
|
14
|
+
p: NodeIdentifiers;
|
|
15
|
+
} | {
|
|
16
|
+
type: "union";
|
|
17
|
+
id: string;
|
|
18
|
+
str: string;
|
|
19
|
+
p: NodeIdentifiers;
|
|
20
|
+
arrSubEvent: EventIdentifiers[];
|
|
21
|
+
isTailoredStr: boolean;
|
|
22
|
+
};
|
|
23
|
+
type Options = {
|
|
24
|
+
nbElem: number[];
|
|
25
|
+
unionLength: number[];
|
|
26
|
+
isProbasAreNumbers: boolean[];
|
|
27
|
+
};
|
|
28
|
+
export declare const probaAsSumOfProbas: Exercise<Identifiers, Options>;
|
|
29
|
+
export {};
|
|
30
|
+
//# sourceMappingURL=probaAsSumOfProbas.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"probaAsSumOfProbas.d.ts","sourceRoot":"","sources":["../../../../src/exercises/math/probaStat/probaAsSumOfProbas.ts"],"names":[],"mappings":"AACA,OAAO,EACL,QAAQ,EAkBT,MAAM,mBAAmB,CAAC;AAK3B,OAAO,EAEL,eAAe,EAChB,MAAM,qCAAqC,CAAC;AAc7C,KAAK,WAAW,GAAG;IACjB,cAAc,EAAE,MAAM,CAAC;IACvB,QAAQ,EAAE,gBAAgB,CAAC;IAC3B,QAAQ,EAAE,eAAe,EAAE,CAAC;IAE5B,kBAAkB,EAAE,OAAO,CAAC;CAC7B,CAAC;AAEF,KAAK,gBAAgB,GACjB;IACE,IAAI,EAAE,YAAY,CAAC;IACnB,KAAK,EAAE,MAAM,CAAC;IACd,EAAE,EAAE,MAAM,CAAC;IACX,GAAG,EAAE,MAAM,CAAC;IACZ,CAAC,EAAE,eAAe,CAAC;CACpB,GACD;IACE,IAAI,EAAE,OAAO,CAAC;IACd,EAAE,EAAE,MAAM,CAAC;IACX,GAAG,EAAE,MAAM,CAAC;IACZ,CAAC,EAAE,eAAe,CAAC;IACnB,WAAW,EAAE,gBAAgB,EAAE,CAAC;IAChC,aAAa,EAAE,OAAO,CAAC;CACxB,CAAC;AAifN,KAAK,OAAO,GAAG;IACb,MAAM,EAAE,MAAM,EAAE,CAAC;IACjB,WAAW,EAAE,MAAM,EAAE,CAAC;IACtB,kBAAkB,EAAE,OAAO,EAAE,CAAC;CAC/B,CAAC;AAsTF,eAAO,MAAM,kBAAkB,EAAE,QAAQ,CAAC,WAAW,EAAE,OAAO,CAe7D,CAAC"}
|