math-exercises 3.0.125 → 3.0.127
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/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 +231 -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 +123 -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 +149 -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 +368 -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 +454 -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 +86 -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 +180 -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 +231 -248
- 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 +11 -0
- package/lib/exercises/math/conversion/kmPerMinToKmPerHourConversion.d.ts.map +1 -0
- package/lib/exercises/math/conversion/kmPerMinToKmPerHourConversion.js +116 -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 +243 -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/dataRepresentations/barChartInterpreting.d.ts +53 -0
- package/lib/exercises/math/dataRepresentations/barChartInterpreting.d.ts.map +1 -0
- package/lib/exercises/math/dataRepresentations/barChartInterpreting.js +533 -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 +140 -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 +194 -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 +5 -6
- 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 +117 -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 +118 -0
- 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 +223 -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 +16 -0
- package/lib/exercises/math/functions/affines/representationOfAffine.d.ts.map +1 -0
- package/lib/exercises/math/functions/affines/representationOfAffine.js +275 -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 +235 -0
- 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/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/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/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/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 +65 -88
- 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 +221 -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 +29 -0
- package/lib/exercises/math/probaStat/probaAsSumOfProbas.d.ts.map +1 -0
- package/lib/exercises/math/probaStat/probaAsSumOfProbas.js +547 -0
- 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 +89 -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 +152 -0
- 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/moleculeFormula.d.ts.map +1 -1
- package/lib/exercises/pc/moleculeFormula.js +4 -3
- 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/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/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 +351 -12
- 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/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,117 @@
|
|
|
1
|
+
import { addValidProp, shuffleProps, tryToAddWrongProp, } from "../../../../exercises/exercise.js";
|
|
2
|
+
import { getDistinctQuestions } from "../../../../exercises/utils/getDistinctQuestions.js";
|
|
3
|
+
import { Affine, AffineConstructor } from "../../../../math/polynomials/affine.js";
|
|
4
|
+
import { Polynomial } from "../../../../math/polynomials/polynomial.js";
|
|
5
|
+
import { randint } from "../../../../math/utils/random/randint.js";
|
|
6
|
+
import { equationResolutionTex } from "../../../../tree/nodes/equations/equalNode.js";
|
|
7
|
+
import { add } from "../../../../tree/nodes/operators/addNode.js";
|
|
8
|
+
import { frac } from "../../../../tree/nodes/operators/fractionNode.js";
|
|
9
|
+
import { substract } from "../../../../tree/nodes/operators/substractNode.js";
|
|
10
|
+
import { pointParser } from "../../../../tree/parsers/pointParser.js";
|
|
11
|
+
const getInstruction = (identifiers) => {
|
|
12
|
+
const { yValue, coeffs } = identifiers;
|
|
13
|
+
const affine = AffineConstructor.fromCoeffs(coeffs);
|
|
14
|
+
return `Le point $M$ d'ordonnée $${yValue}$ appartient à la courbe d'équation
|
|
15
|
+
|
|
16
|
+
$$
|
|
17
|
+
y=${affine.toTex()}
|
|
18
|
+
$$
|
|
19
|
+
|
|
20
|
+
Quelles sont les coordonnées de $M$ ?`;
|
|
21
|
+
};
|
|
22
|
+
const getAnswer = (identifiers) => {
|
|
23
|
+
const { yValue, coeffs } = identifiers;
|
|
24
|
+
const polynome = AffineConstructor.fromCoeffs(coeffs);
|
|
25
|
+
const xValue = polynome.solve(yValue);
|
|
26
|
+
const answer = `(${xValue.toTex()};${yValue.frenchify()})`;
|
|
27
|
+
return answer;
|
|
28
|
+
};
|
|
29
|
+
const getHint = (identifiers) => {
|
|
30
|
+
const { yValue, coeffs } = identifiers;
|
|
31
|
+
const affine = new Affine(coeffs[1], coeffs[0], "x_{M}");
|
|
32
|
+
return `Les coordonnées de $M$ vérifient:
|
|
33
|
+
|
|
34
|
+
$$
|
|
35
|
+
${affine.toTex()} = y_{M}
|
|
36
|
+
$$
|
|
37
|
+
|
|
38
|
+
On doit donc résoudre l'équation :
|
|
39
|
+
|
|
40
|
+
$$
|
|
41
|
+
${affine.toTex()} = ${yValue}
|
|
42
|
+
$$`;
|
|
43
|
+
};
|
|
44
|
+
const getCorrection = (identifiers) => {
|
|
45
|
+
const { yValue, coeffs } = identifiers;
|
|
46
|
+
const affine = new Affine(coeffs[1], coeffs[0], "x_{M}");
|
|
47
|
+
const answer = getAnswer(identifiers);
|
|
48
|
+
return `On résout l'équation :
|
|
49
|
+
|
|
50
|
+
$$
|
|
51
|
+
${affine.toTex()} = ${yValue}
|
|
52
|
+
$$
|
|
53
|
+
|
|
54
|
+
On obtient :
|
|
55
|
+
|
|
56
|
+
$$
|
|
57
|
+
${equationResolutionTex(coeffs[1].toTree(), coeffs[0].toTree(), (0).toTree(), yValue.toTree(), "x_{M}")}
|
|
58
|
+
$$
|
|
59
|
+
|
|
60
|
+
Les coordonnées de $M$ sont donc $${answer}$.`;
|
|
61
|
+
};
|
|
62
|
+
const getPropositions = (n, { answer, coeffs, yValue }) => {
|
|
63
|
+
const [p, m] = coeffs;
|
|
64
|
+
const propositions = [];
|
|
65
|
+
addValidProp(propositions, answer);
|
|
66
|
+
const poly = AffineConstructor.fromCoeffs(coeffs);
|
|
67
|
+
tryToAddWrongProp(propositions, `(${yValue.frenchify()}, ${poly.calculate(yValue).frenchify()})`);
|
|
68
|
+
tryToAddWrongProp(propositions, `(${yValue}, ${AffineConstructor.fromCoeffs([p, -m])
|
|
69
|
+
.calculate(yValue)
|
|
70
|
+
.frenchify()})`);
|
|
71
|
+
tryToAddWrongProp(propositions, `(${frac(add(yValue, p), m).simplify().toTex()}, ${yValue.frenchify()})`);
|
|
72
|
+
return shuffleProps(propositions, n);
|
|
73
|
+
};
|
|
74
|
+
const isAnswerValid = (ans, { answer }) => {
|
|
75
|
+
const pointAns = pointParser(ans);
|
|
76
|
+
if (!pointAns) {
|
|
77
|
+
return false;
|
|
78
|
+
}
|
|
79
|
+
const pointAnswer = pointParser(answer);
|
|
80
|
+
return [
|
|
81
|
+
[pointAns.x, pointAnswer.x],
|
|
82
|
+
[pointAns.y, pointAnswer.y],
|
|
83
|
+
].every(([nodeAns, nodeAnswer]) => substract(nodeAns, nodeAnswer).evaluate() === 0);
|
|
84
|
+
};
|
|
85
|
+
const getCoordsOfPointOnAffineFindXQuestion = () => {
|
|
86
|
+
const polynome1 = new Polynomial([randint(-9, 10), randint(-5, 6, [0])]);
|
|
87
|
+
const xValue = randint(-9, 10);
|
|
88
|
+
const y = polynome1.calculate(xValue);
|
|
89
|
+
const identifiers = { coeffs: polynome1.coefficients, yValue: y };
|
|
90
|
+
return getQuestionFromIdentifiers(identifiers);
|
|
91
|
+
};
|
|
92
|
+
const getQuestionFromIdentifiers = (identifiers) => {
|
|
93
|
+
const question = {
|
|
94
|
+
instruction: getInstruction(identifiers),
|
|
95
|
+
answer: getAnswer(identifiers),
|
|
96
|
+
keys: ["semicolon"],
|
|
97
|
+
answerFormat: "tex",
|
|
98
|
+
identifiers,
|
|
99
|
+
hint: getHint(identifiers),
|
|
100
|
+
correction: getCorrection(identifiers),
|
|
101
|
+
};
|
|
102
|
+
return question;
|
|
103
|
+
};
|
|
104
|
+
export const coordsOfPointOnAffineFindX = {
|
|
105
|
+
id: "coordsOfPointOnAffineFindX",
|
|
106
|
+
label: "Déterminer les coordonnées d'un point appartenant à une droite et dont on connaît l'ordonnée",
|
|
107
|
+
isSingleStep: true,
|
|
108
|
+
generator: (nb) => getDistinctQuestions(getCoordsOfPointOnAffineFindXQuestion, nb),
|
|
109
|
+
qcmTimer: 60,
|
|
110
|
+
freeTimer: 60,
|
|
111
|
+
subject: "Mathématiques",
|
|
112
|
+
getQuestionFromIdentifiers,
|
|
113
|
+
hasHintAndCorrection: true,
|
|
114
|
+
answerType: "QCU",
|
|
115
|
+
getPropositions,
|
|
116
|
+
isAnswerValid,
|
|
117
|
+
};
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
import { Exercise } from "../../../../exercises/exercise.js";
|
|
2
|
+
type Identifiers = {
|
|
3
|
+
coeffs: number[];
|
|
4
|
+
xValue: number;
|
|
5
|
+
};
|
|
6
|
+
export declare const coordsOfPointOnAffineFindY: Exercise<Identifiers>;
|
|
7
|
+
export {};
|
|
8
|
+
//# sourceMappingURL=coordsOfPointOnAffineFindY.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"coordsOfPointOnAffineFindY.d.ts","sourceRoot":"","sources":["../../../../../src/exercises/math/functions/affines/coordsOfPointOnAffineFindY.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,QAAQ,EAcT,MAAM,6BAA6B,CAAC;AAUrC,KAAK,WAAW,GAAG;IACjB,MAAM,EAAE,MAAM,EAAE,CAAC;IACjB,MAAM,EAAE,MAAM,CAAC;CAChB,CAAC;AA+HF,eAAO,MAAM,0BAA0B,EAAE,QAAQ,CAAC,WAAW,CAe5D,CAAC"}
|
|
@@ -0,0 +1,118 @@
|
|
|
1
|
+
import { addValidProp, shuffleProps, tryToAddWrongProp, } from "../../../../exercises/exercise.js";
|
|
2
|
+
import { getDistinctQuestions } from "../../../../exercises/utils/getDistinctQuestions.js";
|
|
3
|
+
import { Point } from "../../../../math/geometry/point.js";
|
|
4
|
+
import { Affine, AffineConstructor } from "../../../../math/polynomials/affine.js";
|
|
5
|
+
import { Polynomial } from "../../../../math/polynomials/polynomial.js";
|
|
6
|
+
import { randint } from "../../../../math/utils/random/randint.js";
|
|
7
|
+
import { multiply } from "../../../../tree/nodes/operators/multiplyNode.js";
|
|
8
|
+
import { substract } from "../../../../tree/nodes/operators/substractNode.js";
|
|
9
|
+
import { pointParser } from "../../../../tree/parsers/pointParser.js";
|
|
10
|
+
const getInstruction = (identifiers) => {
|
|
11
|
+
const { xValue, coeffs } = identifiers;
|
|
12
|
+
const affine = AffineConstructor.fromCoeffs(coeffs);
|
|
13
|
+
return `Le point $M$ d'abscisse $${xValue}$ appartient à la courbe d'équation
|
|
14
|
+
|
|
15
|
+
$$
|
|
16
|
+
y=${affine.toTex()}
|
|
17
|
+
$$
|
|
18
|
+
|
|
19
|
+
Quelles sont les coordonnées de $M$ ?`;
|
|
20
|
+
};
|
|
21
|
+
const getAnswerPoint = (identifiers) => {
|
|
22
|
+
const { xValue, coeffs } = identifiers;
|
|
23
|
+
const polynome = AffineConstructor.fromCoeffs(coeffs);
|
|
24
|
+
const yValue = polynome.calculate(xValue);
|
|
25
|
+
return new Point("A", xValue, yValue);
|
|
26
|
+
};
|
|
27
|
+
const getAnswer = (identifiers) => {
|
|
28
|
+
const answerPoint = getAnswerPoint(identifiers);
|
|
29
|
+
const answer = `(${answerPoint.x.toTex()};${answerPoint.y.toTex()})`;
|
|
30
|
+
return answer;
|
|
31
|
+
};
|
|
32
|
+
const getHint = (identifiers) => {
|
|
33
|
+
const { xValue, coeffs } = identifiers;
|
|
34
|
+
const affine = new Affine(coeffs[1], coeffs[0], "x_{M}");
|
|
35
|
+
return `Les coordonnées de $M$ vérifient:
|
|
36
|
+
|
|
37
|
+
$$
|
|
38
|
+
${affine.toTex()} = y_{M}
|
|
39
|
+
$$
|
|
40
|
+
|
|
41
|
+
On doit calculer :
|
|
42
|
+
|
|
43
|
+
$$
|
|
44
|
+
y_{M} = ${coeffs[1].frenchify()} \\times ${xValue.frenchify()} + ${coeffs[0].frenchify()}
|
|
45
|
+
$$`;
|
|
46
|
+
};
|
|
47
|
+
const getCorrection = (identifiers) => {
|
|
48
|
+
const { xValue, coeffs } = identifiers;
|
|
49
|
+
const polynome = AffineConstructor.fromCoeffs(coeffs);
|
|
50
|
+
const yValue = polynome.calculate(xValue);
|
|
51
|
+
const answer = getAnswer(identifiers);
|
|
52
|
+
return `On calcule :
|
|
53
|
+
|
|
54
|
+
$$
|
|
55
|
+
y_{M} = ${coeffs[1].frenchify()} \\times ${xValue
|
|
56
|
+
.toTree()
|
|
57
|
+
.toTex({ explicitNumberWriting: true })} + ${coeffs[0].frenchify()}
|
|
58
|
+
$$
|
|
59
|
+
|
|
60
|
+
$$
|
|
61
|
+
y_{M} = ${yValue.frenchify()}
|
|
62
|
+
$$
|
|
63
|
+
|
|
64
|
+
Les coordonnées de $M$ sont donc $${answer}$.`;
|
|
65
|
+
};
|
|
66
|
+
const getPropositions = (n, { answer, coeffs, xValue }) => {
|
|
67
|
+
const [p, m] = coeffs;
|
|
68
|
+
const propositions = [];
|
|
69
|
+
addValidProp(propositions, answer);
|
|
70
|
+
const poly = AffineConstructor.fromCoeffs(coeffs);
|
|
71
|
+
tryToAddWrongProp(propositions, `(${m.frenchify()};${p.frenchify()})`);
|
|
72
|
+
tryToAddWrongProp(propositions, `(${p.frenchify()};${m.frenchify()})`);
|
|
73
|
+
tryToAddWrongProp(propositions, `(${xValue.frenchify()};${multiply(m, xValue).simplify().toTex()})`);
|
|
74
|
+
tryToAddWrongProp(propositions, `(${xValue.frenchify()};${poly.calculate(1).frenchify()})`);
|
|
75
|
+
return shuffleProps(propositions, n);
|
|
76
|
+
};
|
|
77
|
+
const isAnswerValid = (ans, { answer, ...identifiers }) => {
|
|
78
|
+
const pointAns = pointParser(ans);
|
|
79
|
+
if (!pointAns)
|
|
80
|
+
return false;
|
|
81
|
+
const pointAnswer = getAnswerPoint(identifiers);
|
|
82
|
+
return [
|
|
83
|
+
[pointAns.x, pointAnswer.x],
|
|
84
|
+
[pointAns.y, pointAnswer.y],
|
|
85
|
+
].every(([ansNode, answerNode]) => substract(ansNode, answerNode).simplify().evaluate() === 0);
|
|
86
|
+
};
|
|
87
|
+
const getCoordsOfPointOnAffineFindYQuestion = () => {
|
|
88
|
+
const polynome1 = new Polynomial([randint(-9, 10), randint(-5, 6, [0])]);
|
|
89
|
+
const xValue = randint(-9, 10);
|
|
90
|
+
const identifiers = { coeffs: polynome1.coefficients, xValue };
|
|
91
|
+
return getQuestionFromIdentifiers(identifiers);
|
|
92
|
+
};
|
|
93
|
+
const getQuestionFromIdentifiers = (identifiers) => {
|
|
94
|
+
const question = {
|
|
95
|
+
instruction: getInstruction(identifiers),
|
|
96
|
+
answer: getAnswer(identifiers),
|
|
97
|
+
keys: ["semicolon"],
|
|
98
|
+
answerFormat: "tex",
|
|
99
|
+
identifiers,
|
|
100
|
+
hint: getHint(identifiers),
|
|
101
|
+
correction: getCorrection(identifiers),
|
|
102
|
+
};
|
|
103
|
+
return question;
|
|
104
|
+
};
|
|
105
|
+
export const coordsOfPointOnAffineFindY = {
|
|
106
|
+
id: "coordsOfPointOnAffineFindY",
|
|
107
|
+
label: "Déterminer les coordonnées d'un point appartenant à une droite et dont on connaît l'abscisse",
|
|
108
|
+
isSingleStep: true,
|
|
109
|
+
generator: (nb) => getDistinctQuestions(getCoordsOfPointOnAffineFindYQuestion, nb),
|
|
110
|
+
getPropositions,
|
|
111
|
+
isAnswerValid,
|
|
112
|
+
qcmTimer: 60,
|
|
113
|
+
freeTimer: 60,
|
|
114
|
+
subject: "Mathématiques",
|
|
115
|
+
getQuestionFromIdentifiers,
|
|
116
|
+
hasHintAndCorrection: true,
|
|
117
|
+
answerType: "QCU",
|
|
118
|
+
};
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
import { Exercise } from "../../../../exercises/exercise.js";
|
|
2
|
+
import { PointIdentifiers } from "../../../../math/geometry/point.js";
|
|
3
|
+
import { NodeIdentifiers } from "../../../../tree/nodes/nodeConstructor.js";
|
|
4
|
+
type Identifiers = {
|
|
5
|
+
pointIdsA: PointIdentifiers;
|
|
6
|
+
leadingCoeff: NodeIdentifiers;
|
|
7
|
+
numberType: string;
|
|
8
|
+
pointIdsB: PointIdentifiers;
|
|
9
|
+
funcName: string;
|
|
10
|
+
};
|
|
11
|
+
type Options = {
|
|
12
|
+
numberTypes: string[];
|
|
13
|
+
};
|
|
14
|
+
export declare const drawAffineFromPointAndLeadingCoeff: Exercise<Identifiers, Options>;
|
|
15
|
+
export {};
|
|
16
|
+
//# sourceMappingURL=drawAffineFromPointAndLeadingCoeff.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"drawAffineFromPointAndLeadingCoeff.d.ts","sourceRoot":"","sources":["../../../../../src/exercises/math/functions/affines/drawAffineFromPointAndLeadingCoeff.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,QAAQ,EAaT,MAAM,6BAA6B,CAAC;AAIrC,OAAO,EAGL,gBAAgB,EACjB,MAAM,8BAA8B,CAAC;AAOtC,OAAO,EAEL,eAAe,EAChB,MAAM,qCAAqC,CAAC;AAI7C,KAAK,WAAW,GAAG;IACjB,SAAS,EAAE,gBAAgB,CAAC;IAC5B,YAAY,EAAE,eAAe,CAAC;IAC9B,UAAU,EAAE,MAAM,CAAC;IACnB,SAAS,EAAE,gBAAgB,CAAC;IAC5B,QAAQ,EAAE,MAAM,CAAC;CAClB,CAAC;AAmJF,KAAK,OAAO,GAAG;IACb,WAAW,EAAE,MAAM,EAAE,CAAC;CACvB,CAAC;AA4FF,eAAO,MAAM,kCAAkC,EAAE,QAAQ,CACvD,WAAW,EACX,OAAO,CAqBR,CAAC"}
|
|
@@ -0,0 +1,215 @@
|
|
|
1
|
+
import { GeneratorOptionTarget, GeneratorOptionType, } from "../../../../exercises/exercise.js";
|
|
2
|
+
import { isGGBLine } from "../../../../exercises/utils/geogebra/isGGBLine.js";
|
|
3
|
+
import { getDistinctQuestions } from "../../../../exercises/utils/getDistinctQuestions.js";
|
|
4
|
+
import { toolBarConstructor } from "../../../../exercises/utils/geogebra/toolBarConstructor.js";
|
|
5
|
+
import { Point, PointConstructor, } from "../../../../math/geometry/point.js";
|
|
6
|
+
import { GeogebraConstructor } from "../../../../geogebra/geogebraConstructor.js";
|
|
7
|
+
import { random } from "../../../../utils/alea/random.js";
|
|
8
|
+
import { Line } from "../../../../math/geometry/line.js";
|
|
9
|
+
import { handleVEAError } from "../../../../utils/errors/handleVEAError.js";
|
|
10
|
+
import { randint } from "../../../../math/utils/random/randint.js";
|
|
11
|
+
import { frac } from "../../../../tree/nodes/operators/fractionNode.js";
|
|
12
|
+
import { NodeConstructor, } from "../../../../tree/nodes/nodeConstructor.js";
|
|
13
|
+
import { add } from "../../../../tree/nodes/operators/addNode.js";
|
|
14
|
+
const getHint = () => {
|
|
15
|
+
return `Si $f$ est une fonction telle que $f(x) = y$,
|
|
16
|
+
alors la droite représentative de f passe par le point de coordonnées $(x;y)$.
|
|
17
|
+
Si le coefficient directeur vaut $\\frac{v}{h}$ alors le point de coordonnées $(x+h;y+v)$
|
|
18
|
+
appartient aussi à la droite représentative de $f$.`;
|
|
19
|
+
};
|
|
20
|
+
const getCorrection = (identifiers) => {
|
|
21
|
+
const { pointIdsA, leadingCoeff, numberType, pointIdsB, funcName } = identifiers;
|
|
22
|
+
const pointA = PointConstructor.fromIdentifiers(pointIdsA);
|
|
23
|
+
const pointB = PointConstructor.fromIdentifiers(pointIdsB);
|
|
24
|
+
const coeff = NodeConstructor.fromIdentifiers(leadingCoeff);
|
|
25
|
+
const texCoeff = numberType === "Fraction" ? coeff.toTex() : coeff.evaluate().frenchify();
|
|
26
|
+
const offsetVert = coeff.leftChild.evaluate();
|
|
27
|
+
const isUp = Math.sign(offsetVert) >= 0;
|
|
28
|
+
const offsetHoriz = coeff.rightChild.evaluate();
|
|
29
|
+
return `La fonction $${funcName}$ est une fonction affine.
|
|
30
|
+
Sa représentation graphique est une droite, que l'on va nommer $d$.
|
|
31
|
+
|
|
32
|
+
On sait que $ ${funcName}(${pointA.x.toTex()}) = ${pointA.y.toTex()} $.
|
|
33
|
+
C'est-à-dire que le point $A$ de coordonnées $(${pointA.x.toTex()}; ${pointA.y.toTex()})$ appartient à $d$.
|
|
34
|
+
|
|
35
|
+
Comme le coefficient directeur est égal à $${texCoeff} = ${coeff.toTex({
|
|
36
|
+
allowMinusAnywhereInFraction: true,
|
|
37
|
+
explicitNumberWriting: true,
|
|
38
|
+
})}$
|
|
39
|
+
alors à partir de $A$, on se déplace verticalement de $${Math.abs(offsetVert).frenchify()}$ carreaux vers le ${isUp ? `haut` : `bas`}
|
|
40
|
+
quand on se déplace horizontalement de $${offsetHoriz.frenchify()}$ carreaux vers la droite.
|
|
41
|
+
|
|
42
|
+
C'est-à-dire que le point $B$ de coordonnées $(${pointB.x.toTex()}; ${pointB.y.toTex()})$ appartient à $d$.
|
|
43
|
+
|
|
44
|
+
On trace donc la droite passant $A(${pointA.x.toTex()}; ${pointA.y.toTex()})$ et $B(${pointB.x
|
|
45
|
+
.evaluate()
|
|
46
|
+
.frenchify()}; ${pointB.y.evaluate().frenchify()})$.`;
|
|
47
|
+
};
|
|
48
|
+
const getInstruction = (identifiers) => {
|
|
49
|
+
const { pointIdsA, leadingCoeff, numberType, funcName } = identifiers;
|
|
50
|
+
const pointA = PointConstructor.fromIdentifiers(pointIdsA);
|
|
51
|
+
const coeff = NodeConstructor.fromIdentifiers(leadingCoeff);
|
|
52
|
+
const texCoeff = numberType === "Fraction" ? coeff.toTex() : coeff.evaluate().frenchify();
|
|
53
|
+
return `La fonction $${funcName}$ est telle que $f(x)=${texCoeff}x+b$ avec b un nombre réel et
|
|
54
|
+
$ ${funcName}(${pointA.x.toTex()}) = ${pointA.y.toTex()} $.
|
|
55
|
+
|
|
56
|
+
Dans le repère, tracer la représentation graphique de la fonction $${funcName}$.`;
|
|
57
|
+
};
|
|
58
|
+
const getStudentGGBOptions = (identifiers) => {
|
|
59
|
+
const { pointIdsA, pointIdsB } = identifiers;
|
|
60
|
+
const pointA = PointConstructor.fromIdentifiers(pointIdsA);
|
|
61
|
+
const pointB = PointConstructor.fromIdentifiers(pointIdsB);
|
|
62
|
+
const studentGGB = new GeogebraConstructor({
|
|
63
|
+
isGridSimple: true,
|
|
64
|
+
customToolBar: toolBarConstructor({
|
|
65
|
+
join: true,
|
|
66
|
+
}),
|
|
67
|
+
});
|
|
68
|
+
const [xA, xB, yA, yB] = [pointA.x, pointB.x, pointA.y, pointB.y].map((node) => node.evaluate());
|
|
69
|
+
const [xMin, xMax, yMin, yMax] = [
|
|
70
|
+
Math.min(xA, xB),
|
|
71
|
+
Math.max(xA, xB),
|
|
72
|
+
Math.min(yA, yB),
|
|
73
|
+
Math.max(yA, yB),
|
|
74
|
+
];
|
|
75
|
+
return studentGGB.getOptions({
|
|
76
|
+
coords: studentGGB.getAdaptedCoords({
|
|
77
|
+
xMin,
|
|
78
|
+
xMax,
|
|
79
|
+
yMax,
|
|
80
|
+
yMin,
|
|
81
|
+
forceShowAxes: true,
|
|
82
|
+
}),
|
|
83
|
+
});
|
|
84
|
+
};
|
|
85
|
+
const getGGBAnswer = (identifiers) => {
|
|
86
|
+
const { pointIdsA, pointIdsB } = identifiers;
|
|
87
|
+
const pointA = PointConstructor.fromIdentifiers(pointIdsA);
|
|
88
|
+
const pointB = PointConstructor.fromIdentifiers(pointIdsB);
|
|
89
|
+
return [
|
|
90
|
+
`(${pointA.x.evaluate()},${pointA.y.evaluate()})`,
|
|
91
|
+
`(${pointB.x.evaluate()},${pointB.y.evaluate()})`,
|
|
92
|
+
`Line[A, B]`,
|
|
93
|
+
];
|
|
94
|
+
};
|
|
95
|
+
const isGGBAnswerValid = (ans, { pointIdsA, pointIdsB }) => {
|
|
96
|
+
try {
|
|
97
|
+
//parse la line (si +1, faux)
|
|
98
|
+
// parse le spoints de la line
|
|
99
|
+
//transformer en vrai droite
|
|
100
|
+
// checker si A et B sont sur la droite
|
|
101
|
+
const lines = ans.filter((s) => isGGBLine(s));
|
|
102
|
+
if (lines.length !== 1)
|
|
103
|
+
return false;
|
|
104
|
+
const pointNames = lines[0]
|
|
105
|
+
.split("Line")[1]
|
|
106
|
+
.replace("[", "")
|
|
107
|
+
.replace("]", "")
|
|
108
|
+
.replace(" ", "")
|
|
109
|
+
.split(",");
|
|
110
|
+
const pointCmds = ans.filter((s) => s.startsWith(pointNames[0] + "=") || s.startsWith(pointNames[1] + "="));
|
|
111
|
+
const pointsCoords = pointCmds.map((cmd) => cmd
|
|
112
|
+
.split("=")[1]
|
|
113
|
+
.replace("(", "")
|
|
114
|
+
.replace(")", "")
|
|
115
|
+
.split(",")
|
|
116
|
+
.map((n) => Number(n)));
|
|
117
|
+
const points = pointsCoords.map((coord) => new Point("A", coord[0], coord[1]));
|
|
118
|
+
const line = new Line(points[0], points[1]);
|
|
119
|
+
const A = PointConstructor.fromIdentifiers(pointIdsA);
|
|
120
|
+
const B = PointConstructor.fromIdentifiers(pointIdsB);
|
|
121
|
+
return line.includes(A, 0.5) && line.includes(B, 0.5);
|
|
122
|
+
}
|
|
123
|
+
catch (err) {
|
|
124
|
+
return handleVEAError(err);
|
|
125
|
+
}
|
|
126
|
+
};
|
|
127
|
+
const optsDefault = {
|
|
128
|
+
numberTypes: ["Entier", ".5", "Fraction"],
|
|
129
|
+
};
|
|
130
|
+
const options = [
|
|
131
|
+
{
|
|
132
|
+
id: "numberTypes",
|
|
133
|
+
label: "Type de coefficient directeur",
|
|
134
|
+
type: GeneratorOptionType.multiselect,
|
|
135
|
+
target: GeneratorOptionTarget.generation,
|
|
136
|
+
values: ["Entier", ".5", "Fraction"],
|
|
137
|
+
defaultValue: optsDefault.numberTypes,
|
|
138
|
+
},
|
|
139
|
+
];
|
|
140
|
+
const getDrawAffineFromPointAndLeadingCoeffQuestion = (optsIn) => {
|
|
141
|
+
const opts = optsIn ?? optsDefault;
|
|
142
|
+
const numberType = random(opts.numberTypes);
|
|
143
|
+
let v;
|
|
144
|
+
let h;
|
|
145
|
+
switch (numberType) {
|
|
146
|
+
case ".5":
|
|
147
|
+
{
|
|
148
|
+
h = 2;
|
|
149
|
+
v = random([...Array(21).keys()].map((i) => i - 10).filter((v) => v % h !== 0));
|
|
150
|
+
}
|
|
151
|
+
break;
|
|
152
|
+
case "Fraction":
|
|
153
|
+
{
|
|
154
|
+
v = randint(-11, 11, [-11, 0]);
|
|
155
|
+
h = random([2, 3, 4, 5, 6, 7, 8, 9].filter((h) => v % h !== 0));
|
|
156
|
+
}
|
|
157
|
+
break;
|
|
158
|
+
default:
|
|
159
|
+
case "Entier":
|
|
160
|
+
{
|
|
161
|
+
v = randint(-11, 11, [-11]);
|
|
162
|
+
h = 1;
|
|
163
|
+
}
|
|
164
|
+
break;
|
|
165
|
+
}
|
|
166
|
+
const leadingCoeffNode = frac(v, h);
|
|
167
|
+
const availableCoordValues = [...Array(21).keys()].map((i) => i - 10);
|
|
168
|
+
const [xA, yA] = [0, 1].map((_) => random(availableCoordValues));
|
|
169
|
+
const xOffset = leadingCoeffNode.rightChild.evaluate();
|
|
170
|
+
const [xB, yB] = [
|
|
171
|
+
add(xA, xOffset),
|
|
172
|
+
add(yA, leadingCoeffNode.leftChild.evaluate()),
|
|
173
|
+
];
|
|
174
|
+
const pointA = new Point("A", xA, yA);
|
|
175
|
+
const pointB = new Point("B", xB, yB);
|
|
176
|
+
const funcName = random(["f", "g"]);
|
|
177
|
+
const identifiers = {
|
|
178
|
+
pointIdsA: pointA.toIdentifiers(),
|
|
179
|
+
leadingCoeff: leadingCoeffNode.toIdentifiers(),
|
|
180
|
+
numberType: numberType,
|
|
181
|
+
pointIdsB: pointB.toIdentifiers(),
|
|
182
|
+
funcName,
|
|
183
|
+
};
|
|
184
|
+
return getQuestionFromIdentifiers(identifiers, opts);
|
|
185
|
+
};
|
|
186
|
+
const getQuestionFromIdentifiers = (identifiers, opts) => {
|
|
187
|
+
const question = {
|
|
188
|
+
ggbAnswer: getGGBAnswer(identifiers),
|
|
189
|
+
instruction: getInstruction(identifiers),
|
|
190
|
+
keys: [],
|
|
191
|
+
answerFormat: "tex",
|
|
192
|
+
studentGgbOptions: getStudentGGBOptions(identifiers),
|
|
193
|
+
identifiers,
|
|
194
|
+
hint: getHint(identifiers),
|
|
195
|
+
correction: getCorrection(identifiers),
|
|
196
|
+
options: opts,
|
|
197
|
+
};
|
|
198
|
+
return question;
|
|
199
|
+
};
|
|
200
|
+
export const drawAffineFromPointAndLeadingCoeff = {
|
|
201
|
+
id: "drawAffineFromPointAndLeadingCoeff",
|
|
202
|
+
label: "Tracer la représentation graphique d'une fonction affine avec un point et le coefficient directeur",
|
|
203
|
+
isSingleStep: true,
|
|
204
|
+
answerType: "GGB",
|
|
205
|
+
generator: (nb, opts) => getDistinctQuestions(() => getDrawAffineFromPointAndLeadingCoeffQuestion(opts), nb),
|
|
206
|
+
options,
|
|
207
|
+
ggbTimer: 60,
|
|
208
|
+
isGGBAnswerValid,
|
|
209
|
+
subject: "Mathématiques",
|
|
210
|
+
getGGBAnswer,
|
|
211
|
+
getInstruction,
|
|
212
|
+
getStudentGGBOptions,
|
|
213
|
+
getQuestionFromIdentifiers,
|
|
214
|
+
hasHintAndCorrection: true,
|
|
215
|
+
};
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
import { Exercise } from "../../../../exercises/exercise.js";
|
|
2
|
+
import { ProgCalcIdentifiers } from "../../../../math/progCalc/progCalc.js";
|
|
3
|
+
type Identifiers = {
|
|
4
|
+
progCalcIds: ProgCalcIdentifiers;
|
|
5
|
+
funcName: string;
|
|
6
|
+
};
|
|
7
|
+
type Options = {
|
|
8
|
+
nbSteps: Exclude<number, 0>;
|
|
9
|
+
isSingleUseOperators: boolean;
|
|
10
|
+
};
|
|
11
|
+
export declare const drawAffineFromProgCalc: Exercise<Identifiers, Options>;
|
|
12
|
+
export {};
|
|
13
|
+
//# sourceMappingURL=drawAffineFromProgCalc.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"drawAffineFromProgCalc.d.ts","sourceRoot":"","sources":["../../../../../src/exercises/math/functions/affines/drawAffineFromProgCalc.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,QAAQ,EAYT,MAAM,6BAA6B,CAAC;AASrC,OAAO,EAEL,mBAAmB,EAEpB,MAAM,iCAAiC,CAAC;AAOzC,KAAK,WAAW,GAAG;IACjB,WAAW,EAAE,mBAAmB,CAAC;IACjC,QAAQ,EAAE,MAAM,CAAC;CAClB,CAAC;AA+NF,KAAK,OAAO,GAAG;IACb,OAAO,EAAE,OAAO,CAAC,MAAM,EAAE,CAAC,CAAC,CAAC;IAC5B,oBAAoB,EAAE,OAAO,CAAC;CAC/B,CAAC;AAwBF,eAAO,MAAM,sBAAsB,EAAE,QAAQ,CAAC,WAAW,EAAE,OAAO,CAmBjE,CAAC"}
|