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,216 @@
|
|
|
1
|
+
import { addValidProp, shuffleProps, tryToAddWrongProp, } from "../../../../exercises/exercise.js";
|
|
2
|
+
import { getDistinctQuestions } from "../../../../exercises/utils/getDistinctQuestions.js";
|
|
3
|
+
import { Polynomial } from "../../../../math/polynomials/polynomial.js";
|
|
4
|
+
import { randint } from "../../../../math/utils/random/randint.js";
|
|
5
|
+
import { NodeConstructor, } from "../../../../tree/nodes/nodeConstructor.js";
|
|
6
|
+
import { add } from "../../../../tree/nodes/operators/addNode.js";
|
|
7
|
+
import { frac } from "../../../../tree/nodes/operators/fractionNode.js";
|
|
8
|
+
import { multiply } from "../../../../tree/nodes/operators/multiplyNode.js";
|
|
9
|
+
import { isOperatorNode, OperatorIds, } from "../../../../tree/nodes/operators/operatorNode.js";
|
|
10
|
+
import { power } from "../../../../tree/nodes/operators/powerNode.js";
|
|
11
|
+
import { substract } from "../../../../tree/nodes/operators/substractNode.js";
|
|
12
|
+
import { parseAlgebraic } from "../../../../tree/parsers/latexParser.js";
|
|
13
|
+
import { coinFlip } from "../../../../utils/alea/coinFlip.js";
|
|
14
|
+
import { random } from "../../../../utils/alea/random.js";
|
|
15
|
+
const nodeByReplacingOperations = (node, replacementDict) => {
|
|
16
|
+
if (isOperatorNode(node)) {
|
|
17
|
+
const leftChild = nodeByReplacingOperations(node.leftChild, replacementDict);
|
|
18
|
+
const rightChild = nodeByReplacingOperations(node.rightChild, replacementDict);
|
|
19
|
+
const targetOperatorId = replacementDict[+node.id] ?? node.id;
|
|
20
|
+
switch (+targetOperatorId) {
|
|
21
|
+
case OperatorIds.add:
|
|
22
|
+
return add(leftChild, rightChild);
|
|
23
|
+
case OperatorIds.substract:
|
|
24
|
+
return substract(leftChild, rightChild);
|
|
25
|
+
case OperatorIds.multiply:
|
|
26
|
+
return multiply(leftChild, rightChild);
|
|
27
|
+
case OperatorIds.divide:
|
|
28
|
+
return frac(leftChild, rightChild);
|
|
29
|
+
case OperatorIds.power:
|
|
30
|
+
return power(leftChild, rightChild);
|
|
31
|
+
default:
|
|
32
|
+
return add(leftChild, rightChild);
|
|
33
|
+
}
|
|
34
|
+
}
|
|
35
|
+
else {
|
|
36
|
+
return node;
|
|
37
|
+
}
|
|
38
|
+
};
|
|
39
|
+
const nodeBySubstitutingX = (node, strVar) => {
|
|
40
|
+
return parseAlgebraic(node.toTex().replaceAll("x", `"${strVar}"`));
|
|
41
|
+
};
|
|
42
|
+
const getInstruction = (identifiers) => {
|
|
43
|
+
const { xValue, questionFunc } = identifiers;
|
|
44
|
+
const node = NodeConstructor.fromIdentifiers(questionFunc.nodeIds);
|
|
45
|
+
return `Le point $M$ d'abscisse $${xValue}$ appartient à la courbe d'équation
|
|
46
|
+
|
|
47
|
+
$$
|
|
48
|
+
y=${node.toTex()}
|
|
49
|
+
$$
|
|
50
|
+
|
|
51
|
+
Quelles sont les coordonnées de $M$ ?`;
|
|
52
|
+
};
|
|
53
|
+
const getAnswer = (identifiers) => {
|
|
54
|
+
const { xValue, questionFunc } = identifiers;
|
|
55
|
+
const node = NodeConstructor.fromIdentifiers(questionFunc.nodeIds);
|
|
56
|
+
const nodeWithXValue = nodeBySubstitutingX(node, `(${xValue})`);
|
|
57
|
+
const answer = `(${xValue.frenchify()};${nodeWithXValue
|
|
58
|
+
.simplify({ calculatePowers: true })
|
|
59
|
+
.toTex()})`;
|
|
60
|
+
return answer;
|
|
61
|
+
};
|
|
62
|
+
const getHint = (identifiers) => {
|
|
63
|
+
const { xValue, questionFunc } = identifiers;
|
|
64
|
+
const node = NodeConstructor.fromIdentifiers(questionFunc.nodeIds);
|
|
65
|
+
const texWithXM = node.toTex().replaceAll("x", "x_M");
|
|
66
|
+
const nodeWithXValue = nodeBySubstitutingX(node, `(${xValue})`);
|
|
67
|
+
return `Les coordonnées $(x_M;y_M)$ de $M$ vérifient:
|
|
68
|
+
|
|
69
|
+
$$
|
|
70
|
+
${texWithXM} = y_M
|
|
71
|
+
$$
|
|
72
|
+
|
|
73
|
+
On doit calculer :
|
|
74
|
+
|
|
75
|
+
$$
|
|
76
|
+
y_M = ${nodeWithXValue.toTex()}
|
|
77
|
+
$$`;
|
|
78
|
+
};
|
|
79
|
+
const getCorrection = (identifiers) => {
|
|
80
|
+
const { xValue, questionFunc } = identifiers;
|
|
81
|
+
const node = NodeConstructor.fromIdentifiers(questionFunc.nodeIds);
|
|
82
|
+
const texWithXM = node.toTex().replaceAll("x", "x_M");
|
|
83
|
+
const nodeWithXValue = nodeBySubstitutingX(node, `(${xValue})`);
|
|
84
|
+
const answer = getAnswer(identifiers);
|
|
85
|
+
return `Les coordonnées $(x_M;y_M)$ de $M$ vérifient:
|
|
86
|
+
|
|
87
|
+
$$
|
|
88
|
+
${texWithXM} = y_M
|
|
89
|
+
$$
|
|
90
|
+
|
|
91
|
+
On calcule :
|
|
92
|
+
|
|
93
|
+
$$
|
|
94
|
+
y_M = ${nodeWithXValue.toTex()}
|
|
95
|
+
$$
|
|
96
|
+
|
|
97
|
+
$$
|
|
98
|
+
y_M = ${answer.slice(1, -1).split(";")[1]}
|
|
99
|
+
$$
|
|
100
|
+
|
|
101
|
+
Les coordonnées de $M$ sont donc $${answer}$.`;
|
|
102
|
+
};
|
|
103
|
+
const getPropositions = (n, { answer, questionFunc, xValue }) => {
|
|
104
|
+
const node = NodeConstructor.fromIdentifiers(questionFunc.nodeIds);
|
|
105
|
+
const propositions = [];
|
|
106
|
+
addValidProp(propositions, answer);
|
|
107
|
+
//power becomes multiply
|
|
108
|
+
tryToAddWrongProp(propositions, `(${xValue.frenchify()};${nodeBySubstitutingX(nodeByReplacingOperations(node, {
|
|
109
|
+
[OperatorIds.power]: OperatorIds.multiply,
|
|
110
|
+
}), `(${xValue})`)
|
|
111
|
+
.simplify({ calculatePowers: true })
|
|
112
|
+
.toTex()})`);
|
|
113
|
+
//sign mistake
|
|
114
|
+
tryToAddWrongProp(propositions, `(${xValue.frenchify()};${nodeBySubstitutingX(nodeByReplacingOperations(node, {
|
|
115
|
+
[OperatorIds.add]: OperatorIds.substract,
|
|
116
|
+
[OperatorIds.substract]: coinFlip()
|
|
117
|
+
? OperatorIds.add
|
|
118
|
+
: OperatorIds.substract,
|
|
119
|
+
}), `(${xValue})`)
|
|
120
|
+
.simplify({ calculatePowers: true })
|
|
121
|
+
.toTex()})`);
|
|
122
|
+
//multiply becomes add
|
|
123
|
+
tryToAddWrongProp(propositions, `(${xValue.frenchify()};${nodeBySubstitutingX(nodeByReplacingOperations(node, {
|
|
124
|
+
[OperatorIds.multiply]: OperatorIds.add,
|
|
125
|
+
}), `(${xValue})`)
|
|
126
|
+
.simplify({ calculatePowers: true })
|
|
127
|
+
.toTex()})`);
|
|
128
|
+
//let's try 0
|
|
129
|
+
tryToAddWrongProp(propositions, `(${xValue.frenchify()};0)`);
|
|
130
|
+
//(x,y) becomes (y,x)
|
|
131
|
+
if (propositions.length < n) {
|
|
132
|
+
const [x, y] = answer.slice(1, -1).split(";");
|
|
133
|
+
tryToAddWrongProp(propositions, `(${y};${x})`);
|
|
134
|
+
}
|
|
135
|
+
while (propositions.length < n) {
|
|
136
|
+
tryToAddWrongProp(propositions, `(${xValue.frenchify()};${randint(-50, 50, [0])})`);
|
|
137
|
+
tryToAddWrongProp(propositions, `(${randint(-50, 50, [0])};${xValue.frenchify()})`);
|
|
138
|
+
}
|
|
139
|
+
return shuffleProps(propositions, n);
|
|
140
|
+
};
|
|
141
|
+
const getCoordsOfPointOnAffineFindYQuestion = () => {
|
|
142
|
+
const xValue = randint(-9, 10);
|
|
143
|
+
const questionFunc = random([
|
|
144
|
+
{
|
|
145
|
+
type: "...x^2",
|
|
146
|
+
nodeIds: new Polynomial([
|
|
147
|
+
randint(-9, 10),
|
|
148
|
+
randint(-5, 6),
|
|
149
|
+
randint(-2, 3, [0]),
|
|
150
|
+
])
|
|
151
|
+
.toTree()
|
|
152
|
+
.toIdentifiers(),
|
|
153
|
+
},
|
|
154
|
+
{
|
|
155
|
+
type: "...x^3",
|
|
156
|
+
nodeIds: new Polynomial([
|
|
157
|
+
randint(-9, 10),
|
|
158
|
+
randint(-5, 6),
|
|
159
|
+
0,
|
|
160
|
+
randint(-1, 2, [0]),
|
|
161
|
+
])
|
|
162
|
+
.toTree()
|
|
163
|
+
.toIdentifiers(),
|
|
164
|
+
},
|
|
165
|
+
{
|
|
166
|
+
type: "(x-...)(x-...)",
|
|
167
|
+
nodeIds: multiply(substract("x", randint(-3, 4, [xValue])), substract("x", randint(-3, 4, [0, xValue]))).toIdentifiers(),
|
|
168
|
+
},
|
|
169
|
+
{
|
|
170
|
+
type: "(x+...)(x-...)",
|
|
171
|
+
nodeIds: multiply(add("x", randint(-3, 4, [-xValue])), substract("x", randint(-3, 4, [0, xValue]))).toIdentifiers(),
|
|
172
|
+
},
|
|
173
|
+
{
|
|
174
|
+
type: "(x+...)(x+...)",
|
|
175
|
+
nodeIds: multiply(add("x", randint(-3, 4, [-xValue])), add("x", randint(-3, 4, [0, -xValue]))).toIdentifiers(),
|
|
176
|
+
},
|
|
177
|
+
{
|
|
178
|
+
type: "a/(x+...)",
|
|
179
|
+
nodeIds: frac(randint(-3, 4, [0]), add("x", randint(-3, 4, [0, -xValue]))).toIdentifiers(),
|
|
180
|
+
},
|
|
181
|
+
{
|
|
182
|
+
type: "(x+...)/(x+...)",
|
|
183
|
+
nodeIds: frac(add("x", randint(-3, 4)), add("x", randint(-3, 4, [0, -xValue]))).toIdentifiers(),
|
|
184
|
+
},
|
|
185
|
+
]);
|
|
186
|
+
const identifiers = {
|
|
187
|
+
questionFunc,
|
|
188
|
+
xValue,
|
|
189
|
+
};
|
|
190
|
+
return getQuestionFromIdentifiers(identifiers);
|
|
191
|
+
};
|
|
192
|
+
const getQuestionFromIdentifiers = (identifiers) => {
|
|
193
|
+
const question = {
|
|
194
|
+
instruction: getInstruction(identifiers),
|
|
195
|
+
answer: getAnswer(identifiers),
|
|
196
|
+
keys: [],
|
|
197
|
+
answerFormat: "tex",
|
|
198
|
+
identifiers,
|
|
199
|
+
hint: getHint(identifiers),
|
|
200
|
+
correction: getCorrection(identifiers),
|
|
201
|
+
};
|
|
202
|
+
return question;
|
|
203
|
+
};
|
|
204
|
+
export const coordsOfPointOnCurveFindY = {
|
|
205
|
+
id: "coordsOfPointOnCurveFindY",
|
|
206
|
+
getPropositions,
|
|
207
|
+
label: "Déterminer les coordonnées d'un point appartenant à une courbe et dont on connaît l'abscisse",
|
|
208
|
+
isSingleStep: true,
|
|
209
|
+
generator: (nb) => getDistinctQuestions(getCoordsOfPointOnAffineFindYQuestion, nb),
|
|
210
|
+
qcmTimer: 60,
|
|
211
|
+
freeTimer: 60,
|
|
212
|
+
subject: "Mathématiques",
|
|
213
|
+
getQuestionFromIdentifiers,
|
|
214
|
+
hasHintAndCorrection: true,
|
|
215
|
+
answerType: "QCU",
|
|
216
|
+
};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"findZeroesProductQuotient.d.ts","sourceRoot":"","sources":["../../../../../src/exercises/math/functions/basics/findZeroesProductQuotient.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,QAAQ,EAeT,MAAM,6BAA6B,CAAC;
|
|
1
|
+
{"version":3,"file":"findZeroesProductQuotient.d.ts","sourceRoot":"","sources":["../../../../../src/exercises/math/functions/basics/findZeroesProductQuotient.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,QAAQ,EAeT,MAAM,6BAA6B,CAAC;AAuBrC,KAAK,WAAW,GAAG;IACjB,IAAI,EAAE,MAAM,CAAC;IACb,CAAC,EAAE,MAAM,CAAC;IACV,CAAC,CAAC,EAAE,MAAM,CAAC;IACX,CAAC,CAAC,EAAE,MAAM,CAAC;IACX,CAAC,CAAC,EAAE,MAAM,CAAC;CACZ,CAAC;AA6QF,eAAO,MAAM,yBAAyB,EAAE,QAAQ,CAAC,WAAW,CAkB3D,CAAC"}
|
|
@@ -153,17 +153,44 @@ $$
|
|
|
153
153
|
const getKeys = () => {
|
|
154
154
|
return ["S", "equal", "lbrace", "semicolon", "rbrace"];
|
|
155
155
|
};
|
|
156
|
-
const isAnswerValid = (ans, { answer }) => {
|
|
156
|
+
const isAnswerValid = (ans, { answer, ...identifiers }) => {
|
|
157
157
|
try {
|
|
158
158
|
const parsed = discreteSetParser(ans);
|
|
159
159
|
if (!parsed)
|
|
160
160
|
return false;
|
|
161
|
-
|
|
161
|
+
const roots = getRoots(identifiers).map((r) => r.simplify());
|
|
162
|
+
return isArrayOfNodesValid(parsed.elements, roots);
|
|
162
163
|
}
|
|
163
164
|
catch (err) {
|
|
164
165
|
return handleVEAError(err);
|
|
165
166
|
}
|
|
166
167
|
};
|
|
168
|
+
const isArrayOfNodesValid = (arrAns, arrAnswer) => {
|
|
169
|
+
//tried with toAllValidTexs() but there is always an unhandled case
|
|
170
|
+
function isNodesEqual(node1, node2) {
|
|
171
|
+
return [1, 1_000, 1_000_000].every((factor) => substract(multiply(factor, node1), multiply(factor, node2)).evaluate() === 0);
|
|
172
|
+
}
|
|
173
|
+
const dictAnswer = Object.fromEntries(arrAnswer.map((node, i) => [i, node]));
|
|
174
|
+
let isValid = true;
|
|
175
|
+
for (let i = 0; i < arrAns.length; i++) {
|
|
176
|
+
const nodeAns = arrAns[i];
|
|
177
|
+
let isFound = false;
|
|
178
|
+
const keys = Object.keys(dictAnswer);
|
|
179
|
+
for (let j = 0; j < keys.length; j++) {
|
|
180
|
+
const key = keys[j];
|
|
181
|
+
const answerNode = dictAnswer[key];
|
|
182
|
+
if (isNodesEqual(nodeAns, answerNode)) {
|
|
183
|
+
isFound = true;
|
|
184
|
+
delete dictAnswer[key]; //one-to-one correspondence
|
|
185
|
+
break;
|
|
186
|
+
}
|
|
187
|
+
}
|
|
188
|
+
isValid = isValid && isFound;
|
|
189
|
+
if (!isValid)
|
|
190
|
+
break;
|
|
191
|
+
}
|
|
192
|
+
return isValid;
|
|
193
|
+
};
|
|
167
194
|
const getFindZeroesProductQuotientQuestion = () => {
|
|
168
195
|
const type = randint(0, 3);
|
|
169
196
|
let a = 0;
|
|
@@ -15,4 +15,5 @@ export * from "./valueTableFromGraph.js";
|
|
|
15
15
|
export * from "./isPointOnFunction.js";
|
|
16
16
|
export * from "./countFunctionZeroes.js";
|
|
17
17
|
export * from "./findZeroesProductQuotient.js";
|
|
18
|
+
export * from "./coordsOfPointOnCurveFindY.js";
|
|
18
19
|
//# sourceMappingURL=index.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../../src/exercises/math/functions/basics/index.ts"],"names":[],"mappings":"AAAA,cAAc,oBAAoB,CAAC;AACnC,cAAc,4BAA4B,CAAC;AAC3C,cAAc,2BAA2B,CAAC;AAC1C,cAAc,mCAAmC,CAAC;AAClD,cAAc,sBAAsB,CAAC;AACrC,cAAc,wBAAwB,CAAC;AACvC,cAAc,2BAA2B,CAAC;AAC1C,cAAc,6BAA6B,CAAC;AAC5C,cAAc,gCAAgC,CAAC;AAC/C,cAAc,kCAAkC,CAAC;AACjD,cAAc,8BAA8B,CAAC;AAC7C,cAAc,qBAAqB,CAAC;AACpC,cAAc,2BAA2B,CAAC;AAC1C,cAAc,0BAA0B,CAAC;AACzC,cAAc,wBAAwB,CAAC;AACvC,cAAc,0BAA0B,CAAC;AACzC,cAAc,gCAAgC,CAAC"}
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../../src/exercises/math/functions/basics/index.ts"],"names":[],"mappings":"AAAA,cAAc,oBAAoB,CAAC;AACnC,cAAc,4BAA4B,CAAC;AAC3C,cAAc,2BAA2B,CAAC;AAC1C,cAAc,mCAAmC,CAAC;AAClD,cAAc,sBAAsB,CAAC;AACrC,cAAc,wBAAwB,CAAC;AACvC,cAAc,2BAA2B,CAAC;AAC1C,cAAc,6BAA6B,CAAC;AAC5C,cAAc,gCAAgC,CAAC;AAC/C,cAAc,kCAAkC,CAAC;AACjD,cAAc,8BAA8B,CAAC;AAC7C,cAAc,qBAAqB,CAAC;AACpC,cAAc,2BAA2B,CAAC;AAC1C,cAAc,0BAA0B,CAAC;AACzC,cAAc,wBAAwB,CAAC;AACvC,cAAc,0BAA0B,CAAC;AACzC,cAAc,gCAAgC,CAAC;AAC/C,cAAc,gCAAgC,CAAC"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"inverseImageFunctionGeogebra.d.ts","sourceRoot":"","sources":["../../../../../src/exercises/math/functions/basics/inverseImageFunctionGeogebra.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,QAAQ,EAeT,MAAM,6BAA6B,CAAC;AAcrC,KAAK,WAAW,GAAG;IAEjB,MAAM,EAAE,MAAM,CAAC;IAIf,MAAM,EAAE,MAAM,EAAE,EAAE,CAAC;CACpB,CAAC;
|
|
1
|
+
{"version":3,"file":"inverseImageFunctionGeogebra.d.ts","sourceRoot":"","sources":["../../../../../src/exercises/math/functions/basics/inverseImageFunctionGeogebra.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,QAAQ,EAeT,MAAM,6BAA6B,CAAC;AAcrC,KAAK,WAAW,GAAG;IAEjB,MAAM,EAAE,MAAM,CAAC;IAIf,MAAM,EAAE,MAAM,EAAE,EAAE,CAAC;CACpB,CAAC;AAyOF,eAAO,MAAM,4BAA4B,EAAE,QAAQ,CAAC,WAAW,CAkB9D,CAAC"}
|
|
@@ -56,74 +56,85 @@ const getGGBOptions = (identifiers) => {
|
|
|
56
56
|
});
|
|
57
57
|
};
|
|
58
58
|
const getInverseImageFunctionGeogebra = () => {
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
if (
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
else {
|
|
76
|
-
yValue = randint(-6, 7, [0]);
|
|
77
|
-
const constante = randint(-6, 7, [yValue]);
|
|
78
|
-
points.push([0, constante], [1, constante]);
|
|
79
|
-
}
|
|
80
|
-
}
|
|
81
|
-
else {
|
|
82
|
-
if (hasAntecedent) {
|
|
83
|
-
yValue = randint(-6, 7);
|
|
84
|
-
const xIsDecimal = coinFlip();
|
|
85
|
-
const xValue = xIsDecimal
|
|
86
|
-
? randfloat(-6, 7, 2, [yValue])
|
|
87
|
-
: randint(-6, 7, [yValue]);
|
|
88
|
-
const hasTwoAntecedents = probaFlip(0.8);
|
|
89
|
-
if (hasTwoAntecedents) {
|
|
90
|
-
const wrongY = randint(-6, 7, [yValue]);
|
|
91
|
-
const secondAntecedentPoint = [
|
|
92
|
-
randint(-6, 7, [xValue, yValue]),
|
|
93
|
-
yValue,
|
|
94
|
-
];
|
|
95
|
-
points.push([xValue, yValue], [yValue, wrongY], secondAntecedentPoint);
|
|
59
|
+
function generateIdentifiers() {
|
|
60
|
+
const isLine = coinFlip();
|
|
61
|
+
const hasAntecedent = probaFlip(0.8);
|
|
62
|
+
// const isLine = false;
|
|
63
|
+
// const hasAntecedent = true;
|
|
64
|
+
let yValue;
|
|
65
|
+
const points = [];
|
|
66
|
+
if (isLine) {
|
|
67
|
+
if (hasAntecedent) {
|
|
68
|
+
yValue = randint(-6, 7);
|
|
69
|
+
const xIsDecimal = probaFlip(0.3);
|
|
70
|
+
const xValue = xIsDecimal
|
|
71
|
+
? randfloat(-6, 7, 2, [yValue])
|
|
72
|
+
: randint(-6, 7, [yValue]);
|
|
73
|
+
const wrongY = randint(-6, 7);
|
|
74
|
+
points.push([xValue, yValue], [yValue, wrongY]);
|
|
96
75
|
}
|
|
97
76
|
else {
|
|
98
|
-
|
|
99
|
-
const
|
|
100
|
-
points.push([
|
|
77
|
+
yValue = randint(-6, 7, [0]);
|
|
78
|
+
const constante = randint(-6, 7, [yValue]);
|
|
79
|
+
points.push([0, constante], [1, constante]);
|
|
101
80
|
}
|
|
102
81
|
}
|
|
103
82
|
else {
|
|
104
|
-
|
|
105
|
-
|
|
106
|
-
|
|
107
|
-
|
|
108
|
-
|
|
109
|
-
|
|
110
|
-
|
|
111
|
-
|
|
112
|
-
|
|
113
|
-
|
|
114
|
-
|
|
115
|
-
|
|
83
|
+
if (hasAntecedent) {
|
|
84
|
+
yValue = randint(-6, 7);
|
|
85
|
+
const xIsDecimal = coinFlip();
|
|
86
|
+
const xValue = xIsDecimal
|
|
87
|
+
? randfloat(-6, 7, 2, [yValue])
|
|
88
|
+
: randint(-6, 7, [yValue]);
|
|
89
|
+
const hasTwoAntecedents = probaFlip(0.8);
|
|
90
|
+
if (hasTwoAntecedents) {
|
|
91
|
+
const wrongY = randint(-6, 7, [yValue]);
|
|
92
|
+
const secondAntecedentPoint = [
|
|
93
|
+
randint(-6, 7, [xValue, yValue]),
|
|
94
|
+
yValue,
|
|
95
|
+
];
|
|
96
|
+
points.push([xValue, yValue], [yValue, wrongY], secondAntecedentPoint);
|
|
97
|
+
}
|
|
98
|
+
else {
|
|
99
|
+
//(x,y) is summit
|
|
100
|
+
const wrongY = randint(-6, 7, [yValue]);
|
|
101
|
+
points.push([xValue, yValue], [yValue, wrongY], [2 * xValue - yValue, wrongY]);
|
|
102
|
+
}
|
|
103
|
+
}
|
|
104
|
+
else {
|
|
105
|
+
yValue = randint(-8, 9);
|
|
106
|
+
const wrongY = randint(-3, 4, [yValue, yValue - 1, yValue + 1]);
|
|
107
|
+
const below = wrongY < yValue;
|
|
108
|
+
const summit = [
|
|
109
|
+
randint(-6, 7, [yValue]),
|
|
110
|
+
below
|
|
111
|
+
? randint(wrongY + 1, yValue, [wrongY])
|
|
112
|
+
: randint(yValue + 1, wrongY, [wrongY]),
|
|
113
|
+
];
|
|
114
|
+
const thirdPoint = [2 * summit[0] - yValue, wrongY];
|
|
115
|
+
//construire deux autrs points au pif avec y sous/audssu yValus
|
|
116
|
+
points.push([yValue, wrongY], summit, thirdPoint);
|
|
117
|
+
}
|
|
116
118
|
}
|
|
119
|
+
points.sort((p1, p2) => p1[0] - p2[0]);
|
|
120
|
+
const identifiers = {
|
|
121
|
+
// xValue,
|
|
122
|
+
// affineCoeffs: isAffine ? affine!.coefficients : undefined,
|
|
123
|
+
// trinomCoeffs: isAffine ? undefined : trinom!.coefficients,
|
|
124
|
+
yValue,
|
|
125
|
+
points,
|
|
126
|
+
// isAffine,
|
|
127
|
+
};
|
|
128
|
+
return identifiers;
|
|
117
129
|
}
|
|
118
|
-
|
|
119
|
-
|
|
120
|
-
|
|
121
|
-
|
|
122
|
-
|
|
123
|
-
|
|
124
|
-
|
|
125
|
-
|
|
126
|
-
};
|
|
130
|
+
function isInfinityOfSolutions(identifiers) {
|
|
131
|
+
const { yValue, points } = identifiers;
|
|
132
|
+
return points.every((point) => point[1] === yValue);
|
|
133
|
+
}
|
|
134
|
+
let identifiers;
|
|
135
|
+
do {
|
|
136
|
+
identifiers = generateIdentifiers();
|
|
137
|
+
} while (isInfinityOfSolutions(identifiers));
|
|
127
138
|
return getQuestionFromIdentifiers(identifiers);
|
|
128
139
|
};
|
|
129
140
|
const getHint = (identifiers) => {
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
import { Exercise } from "../../../../exercises/exercise.js";
|
|
2
|
+
import { NodeIdentifiers } from "../../../../tree/nodes/nodeConstructor.js";
|
|
3
|
+
type Identifiers = {
|
|
4
|
+
nodeIds: NodeIdentifiers[];
|
|
5
|
+
};
|
|
6
|
+
export declare const functionComposition: Exercise<Identifiers>;
|
|
7
|
+
export {};
|
|
8
|
+
//# sourceMappingURL=functionComposition.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"functionComposition.d.ts","sourceRoot":"","sources":["../../../../../src/exercises/math/functions/composition/functionComposition.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,QAAQ,EAcT,MAAM,6BAA6B,CAAC;AAQrC,OAAO,EAEL,eAAe,EAChB,MAAM,qCAAqC,CAAC;AA+D7C,KAAK,WAAW,GAAG;IACjB,OAAO,EAAE,eAAe,EAAE,CAAC;CAC5B,CAAC;AA+NF,eAAO,MAAM,mBAAmB,EAAE,QAAQ,CAAC,WAAW,CAiBrD,CAAC"}
|